As I already mentioned in my
blog post about the new SLA Management
in Microsoft System Center Service Manager 2012 (SCSM 2012) it isn’t that convenient to add the holidays to an SLA calendar manually.
For this reason, Anders Asp from Lumagate (Sweden) and I started discussing about an easier way to get the holidays in the calendar.
We discovered the following challenges:
1. “Where we can find a list of holidays for all countries?”
2. “How to get a list of holidays in the SLA calendar?”
The answer for the second challenge was easy to find: SCSM 2012 still offers the option to import data via CSV import.
For the first challenge another Microsoft product comes into play: Microsoft Outlook
You can import holidays of different countries in Microsoft Outlook. The files containing the holidays for import are named “Outlook.hol” and are available in the following folder of Outlook:
C:\Program Files\Microsoft Office\Office14\
<YOUR LOCALE IN DECIMAL FORM>
· Put the Outlook.hol file from Outlook in the same folder
· Launch PowerShell and change directory to the folder with your files
· Run the PowerShell script (one line):
.\Generate-SCSMHolidaysCSV.ps1 -CSVOutput <Name of outputfile.csv> -HolidayFile <Path to your OUTLOOK.HOL file> -Country <Name of country> -CalendarName <Name of the SLA calendar in SCSM to which you want to add these holidays>