Forum Discussion

davidashworth's avatar
davidashworth
Copper Contributor
Jun 19, 2022
Solved

Updating an existing Auto Attendant

Hi all,   I have been looking and cant find specific help on this subject. Ive seen loads of posts to create new AA's but not really to change an existing one. The scenario is that i want to update...
  • AndresGorzelany's avatar
    AndresGorzelany
    Jun 20, 2022

    davidashworth 

     

    This is a quick example i made, 

     

    $attendantName = 'AA_BV_01'
    $aa = Get-CsAutoAttendant -NameFilter $attendantName | Where-Object Name -eq $attendantName
    
    
    $content = Get-Content "C:\Message.wav" -Encoding byte -ReadCount 0
    $audioFile = Import-CsOnlineAudioFile -ApplicationId "OrgAutoAttendant" -FileName "Message.wav" -Content $content
    
    
    $greetingPrompt = New-CsAutoAttendantPrompt -AudioFilePrompt $audioFile
    
    $aa.DefaultCallFlow.Greetings=$greetingPrompt
    
    
    # save the config
    Set-CsAutoAttendant -Instance $aa

     

    The key is to save the changes to the $aa object

     

    s