Forum Discussion
Andre Hagmann
Apr 25, 2022Brass Contributor
BUG with Microsoft Teams PowerShell Module 4.x.x for Auto Attendant Management
Dear Microsoft Community I have a working PowerShell Script for toggling a Microsoft Teams Auto Attendant target between CallQueue or a ExternalPstn. Developed since PowerShell Module Version 2.0...
Andre Hagmann
Apr 26, 2022Brass Contributor
Dear Andres
$First = $AutoAttendant.DefaultCallFlow.Menu.MenuOptions | Select-Object -First 1
$First shows
ApplicationEndPoint
Action : TransferCallToTarget
DtmfResponse : Automatic
VoiceResponses :
CallTarget : Type = ApplicationEndpoint
Id = af1dc44d-22e3-4f3c-8e46-877650172514
Prompt :
ExternalPstn
Action : TransferCallToTarget
DtmfResponse : Automatic
VoiceResponses :
CallTarget : Type = ExternalPstn
Id = tel:+41448041414
Prompt :
The Error happend with following Command
$AutoAttendant.DefaultCallFlow.Menu.MenuOptions.Remove($First)
with the working PS Module, the menOptions is now empty, so I can assign the new menuOption
Apr 26, 2022
Hello
I was asking if you run
$AutoAttendant.DefaultCallFlow.Menu.MenuOptions.isFixedSize
(note the isFixedSize at the end), if it is, it is an array of fixed size and that means no items can be removed or added, maybe they changed this to a different kind of collection
see
https://docs.microsoft.com/en-us/dotnet/api/system.collections.arraylist.fixedsize?view=net-6.0#:~:text=A%20collection%20with%20a%20fixed,size%20collection%20reflects%20those%20changes.
I was asking if you run
$AutoAttendant.DefaultCallFlow.Menu.MenuOptions.isFixedSize
(note the isFixedSize at the end), if it is, it is an array of fixed size and that means no items can be removed or added, maybe they changed this to a different kind of collection
see
https://docs.microsoft.com/en-us/dotnet/api/system.collections.arraylist.fixedsize?view=net-6.0#:~:text=A%20collection%20with%20a%20fixed,size%20collection%20reflects%20those%20changes.
- Andre HagmannApr 27, 2022Brass ContributorDear Andreas, the Command $AutoAttendant.DefaultCallFlow.Menu.MenuOptions.IsFixedSize return True
- Apr 27, 2022Ok then, probably the collection was changed to a fixed one, will try to make some tests in my own tenant later
- Andre_HagmannApr 27, 2022Copper ContributorThe Microsoft Documentation is quit weak of the Get, Set-CsAutoattendant CmdLet. Many thanks for you help