The following script is a proof of concept to demonstrate that you can create Outlook holidays automatically with Powershell. The POC script will automatically create a “Test Holiday” on the date that you ran the script. I also added an IF statement to check if the holiday already exists. That way users wouldn’t see the holiday added multiple times. The script can easily be setup to run in a ForEach loop to add multiple holidays in one script. You would just need to update the $Date and $Subject variables for each holiday.
$Date = (Get-Date).ToShortDateString()
$Subject = "Test Holiday"
$Outlook = New-Object -ComObject Outlook.Application
$NameSpace = $Outlook.GetNameSpace("MAPI")
If($NameSpace.GetDefaultFolder(9).Items.Restrict("[Start] = '$Date 12:00 AM' AND [Subject] = '$Subject'").count -eq 0) {
$tzs = $Outlook.TimeZones
$NewEvent = $Outlook.CreateItem(1)
$NewEvent.Subject = $Subject
$NewEvent.Start = $Date
$NewEvent.End = $Date
$NewEvent.StartTimeZone =$tzs["Central Standard Time"]
$NewEvent.EndTimeZone = $tzs["Central Standard Time"]
$NewEvent.Location = "United States"
$NewEvent.Categories = "Holiday"
$NewEvent.AllDayEvent = "True"
$NewEvent.Save()
}