Forum Discussion
Teams - Change greeting message for Call flow during holiday
- Dec 05, 2023
Hi JFM_12,
to change the greeting message of your Auto Attendants in Microsoft Teams using PowerShell, follow these steps:
- Open PowerShell and connect to Teams using the Teams PowerShell Module.
- Utilize the Set-CsAutoAttendant cmdlet to modify the greeting message.
Here's an example script:
$Prompt = New-CsAutoAttendantPrompt -ActiveType TextToSpeech -TextToSpeechPrompt "Your new greeting message" $MenuOption = New-CsAutoAttendantMenuOption -Action TransferToOperator -DtmfResponse Automatic -VoiceResponseList "operator" $Menu = New-CsAutoAttendantMenu -Name "mainMenu" -MenuOptions $MenuOption $CallFlow = New-CsAutoAttendantCallFlow -Name "mainFlow" -Menu $Menu Set-CsAutoAttendant -Identity "Your Auto Attendant Identity" -CallFlows $CallFlow -DefaultCallFlowName "mainFlow"Replace "Your new greeting message" with your desired text and "Your Auto Attendant Identity" with the actual identity of your Auto Attendant²
For more details, refer to the PowerShell cmdlet reference for Auto attendants and Call queues:
PowerShell cmdlet reference for Auto attendants and Call queues - Microsoft Teams | Microsoft Learn
Set-CsAutoAttendant (SkypeForBusiness) | Microsoft Learn
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Hi JFM_12,
you can try to use this additional commands to the existing script to log this information to a file:
# Log information to a file
$LogFilePath = "C:\Path\To\Your\Log\File.txt"
$LogContent = @"
Auto Attendant Name: Your Auto Attendant Name
Start Date: $(Get-Date)
End Date: $(Get-Date).AddDays(7) # Adjust the number of days as needed
Text of Text-to-Speech: Your new greeting message
"@
$LogContent | Out-File -Append -FilePath $LogFilePath
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Thank you. But the script has been already executed.
Is there a way to do it retrospectively.
Regards
JFM_12
- LeonPavesicDec 11, 2023Silver Contributor
Hi JFM_12,
thanks for the update.
Unfortunately, retrospectively obtaining the information about Auto Attendant is not possible because the script was executed.
It could be only possible to retrieve these information using Teams Audit Logs (but I haven´t tested it):
1. Open PowerShell and connect to Teams using the Teams PowerShell Module if you haven't already.Connect-MicrosoftTeams
2. Use the Search-UnifiedAuditLog cmdlet to query the audit logs for relevant operations. Replace CmdletName with the specific cmdlet that was used for Auto Attendant changes (in this case that is Set-CsAutoAttendant)Search-UnifiedAuditLog -Operations CmdletName -StartDate MM/DD/YYYY -EndDate MM/DD/YYYY
Search-UnifiedAuditLog (ExchangePowerShell) | Microsoft LearnPlease click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)