This is a PowerShell Module that allows to retrieve data from from https://www.openholidaysapi.org/. For more information about the API visit the API's website.
The PowerShell Module just makes use of this freely available API. There's no relationship between the API providers and the author of this PS module.
All functions parameters support tab completion with valid values as supported by the API. It supports saving returned data as ICal file (data is retrieved in that format from the API).
Install the module form PowerShell Gallery by running this:
Install-Module -Name OHA -Repository PSGallery
After installing the module, import it to the current session:
Import-Module -Name OHA
Once the module is imported, execute the funtion Get-OHAHoliday
to query the openholidaysapi.org API for data.
Retrieve public holidays for Germany in the current year:
Get-OHAHoliday -Country DE
Retrieve public holidays for Germany for next year and save it in an ICS file on C:\Temp:
Get-OHAHoliday -Country DE -Timeframe NextYear -SaveAsIcal 'C:\Temp'
Retrieve public holidays for France in the next quarter:
Get-OHAHoliday -Country FR -Timeframe NextQuarter
Retrieve public holidays for the federal state of Baden-Württemberg in Germany from 1st of June 2024 til 31st of December 2024:
Get-OHAHoliday -Country DE -Subdivision DE-BW -StartDate (Get-Date -Date 2024-06-01) -EndDate (Get-Date -Date 2024-12-31)
Retrieve next years school holiday data for Austria (all subdivisions/federal states):
Get-OHAHoliday -Country AT -Timeframe NextYear
Retrieve next years school holiday data for Austria (all subdivisions/federal states):
Get-OHAHoliday -HolidayType SchoolHoliday -Country AT -Timeframe NextYear