Forum Discussion
Add existing Holiday to Auto Attendant
- Jul 02, 2025
Okay, understood. There is a CallHandlingAssociation step in there that does that.
Could you please check this and let us know if it helps?
New-CsAutoAttendantCallHandlingAssociation (MicrosoftTeamsPowerShell) | Microsoft Learn
Hello Prasad Das
Thank you very much for your answer.
There is an error for the adding
Set-CsAutoAttendant : A parameter cannot be found that matches parameter name 'HolidaySets'.
As far that I see on explanation the ID of the Get-CsAutoAttendantHolidays needs to be the ID of an existing AA which has the holidays.
The Set-CsAutoAttendant uses only the parameter Instance
Have a great day
JFM_12
Here's an example which you can follow:
$autoAttendant = Get-CsAutoAttendant -Identity "fa9081d6-b4f3-5c96-baec-0b00077709e5"
$christmasGreetingPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt "Our offices are closed for Christmas from December 24 to December 26. Please call back later."
$christmasMenuOption = New-CsAutoAttendantMenuOption -Action DisconnectCall -DtmfResponse Automatic
$christmasMenu = New-CsAutoAttendantMenu -Name "Christmas Menu" -MenuOptions @($christmasMenuOption)
$christmasCallFlow = New-CsAutoAttendantCallFlow -Name "Christmas" -Greetings @($christmasGreetingPrompt) -Menu $christmasMenu
$dtr = New-CsOnlineDateTimeRange -Start "24/12/2017" -End "26/12/2017"
$christmasSchedule = New-CsOnlineSchedule -Name "Christmas" -FixedSchedule -DateTimeRanges @($dtr)
$christmasCallHandlingAssociation = New-CsAutoAttendantCallHandlingAssociation -Type Holiday -ScheduleId $christmasSchedule.Id -CallFlowId $christmasCallFlow.Id
$autoAttendant.CallFlows += @($christmasCallFlow)
$autoAttendant.CallHandlingAssociations += @($christmasCallHandlingAssociation)
Set-CsAutoAttendant -Instance $autoAttendant
This example adds a Christmas holiday to an AA that has an Identity of fa9081d6-b4f3-5c96-baec-0b00077709e5.
Ref: Set-CsAutoAttendant (MicrosoftTeamsPowerShell) | Microsoft Learn
TAC reference here - https://learn.microsoft.com/en-us/microsoftteams/create-a-phone-system-auto-attendant?tabs=call-flow#step-23-set-up-call-flows-for-holidays-optional
- JFM_12Jul 02, 2025Iron Contributor
Hi Prasad Das
Thank you for your answer.
This example creates a new holiday. But I have allready one.
I just need to add the previously created one to a new AA.
Thank you
JFM_12- Prasad_Das-MSFTJul 02, 2025
Microsoft
Okay, understood. There is a CallHandlingAssociation step in there that does that.
Could you please check this and let us know if it helps?
New-CsAutoAttendantCallHandlingAssociation (MicrosoftTeamsPowerShell) | Microsoft Learn