SOLVED

Teams - Change greeting message for Call flow during holiday

Iron Contributor

Hello

We have lots of AutoAttendants.
I am looking for a script to change the greeting message.

Is there a script that changes the greeting message?
Thank you very much
Have a great day
JFM_12

6 Replies
best response confirmed by JFM_12 (Iron Contributor)
Solution

Hi @JFM_12,

to change the greeting message of your Auto Attendants in Microsoft Teams using PowerShell, follow these steps:

  1. Open PowerShell and connect to Teams using the Teams PowerShell Module.
  2. 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)

Hello Leon
Great thank you
Regards
JFM_12
Hello Leon
Is it possible after having made the configuration
to have a report with this information
- Name of AA
- Start/End-Date
- Text of the Texttospeech
Thank you
JFM_12

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)

Hello Leon
Thank you. But the script has been already executed.
Is there a way to do it retrospectively.
Regards
JFM_12

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 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)

1 best response

Accepted Solutions
best response confirmed by JFM_12 (Iron Contributor)
Solution

Hi @JFM_12,

to change the greeting message of your Auto Attendants in Microsoft Teams using PowerShell, follow these steps:

  1. Open PowerShell and connect to Teams using the Teams PowerShell Module.
  2. 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)

View solution in original post