Forum Discussion
davidashworth
Jun 19, 2022Copper Contributor
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...
- Jun 20, 2022
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 $aaThe key is to save the changes to the $aa object
s
Jun 20, 2022
Hello David,
Set-CsAutoAttendant has no -Identity parameter, but -Instance was maybe that a typo? Be sure to be running the latest stable version of the module (4.4.1)
In your example, you are not updating the AA object with the new prompt
Please see here as an example of modifying an AA
https://robdy.io/manage-auto-attendant-general/
and also see here
https://docs.microsoft.com/en-us/powershell/module/skype/new-csautoattendantprompt?view=skype-ps
Set-CsAutoAttendant has no -Identity parameter, but -Instance was maybe that a typo? Be sure to be running the latest stable version of the module (4.4.1)
In your example, you are not updating the AA object with the new prompt
Please see here as an example of modifying an AA
https://robdy.io/manage-auto-attendant-general/
and also see here
https://docs.microsoft.com/en-us/powershell/module/skype/new-csautoattendantprompt?view=skype-ps
- davidashworthJun 20, 2022Copper Contributor
Hi AndresGorzelany ,
Thanks for your reply. I had come across both of those articles yesterday so i have adjusted my script but its still not working. First i am running the required version
I have then adjusted my script to the following:
# get the AA details $attendantName = 'CRED POC AA' $aa = Get-CsAutoAttendant -NameFilter $attendantName | Where-Object Name -eq $attendantName # upload audio file $content = Get-Content "C:\Temp\Voice.wav" -Encoding byte -ReadCount 0 $AudioFile = Import-CsOnlineAudioFile -ApplicationId "OrgAutoAttendant" -FileName "Voice.Wav" -Content $content $AudioFilePrompt = New-CsAutoAttendantPrompt -AudioFilePrompt $audioFile # save the config Set-CsAutoAttendant -Instance $aabut i get an error
i get a different error if i use identity
i have gone through it and cant see any typo's and i think the code is written correctly as per those articles but it still looks like i have something wrong?
Thanks,
David- Jun 20, 2022I don't understand why Instance is not being recognized for you as a parameter, what permissions do you have in the tenant?
- davidashworthJun 20, 2022Copper ContributorHi AndresGorzelany, i am using an account with the Global Admin role