Set-CsPhoneNumberAssignment -Identity $u.SipAddress -PhoneNumber $u.LineURI -PhoneNumberType DirectRouting Write-Host “Set-CsPhoneNumberAssignment -Identity $($u.SipAddress) -PhoneNumber $($u.LineURI) -PhoneNumberType DirectRouting” -ForegroundColor Cyan Set-CsPhoneNumberAssignment -Identity $u.SipAddress -EnterpriseVoiceEnabled $true Write-Host “Set-CsPhoneNumberAssignment -Identity $($u.SipAddress) -EnterpriseVoiceEnabled `$true ” -ForegroundColor Cyan $CSV = Import-CSV “c:\SkypeScripts\Template.csv” I am still shouting at Microsoft on a dialy basis until I hear back from the product team: For a direct routing user you cant run the -EnterpriseVoice switch and the -PhoneNumber switch at the same time either. There are some slight adjustments needs for an online user, as you now have to set the emergency location at the same time. I have changed our setup scripts to be as below for a direct routed user.
We use a Hybrid environment if that helps. Please delete, or let me know to delete it if so. I understand this is not a support forum, so apologies if this is inappropriate. So I am desperately trying to find info anywhere (which is what led me to this post). I have an open case with MS Support but nothing has been resolved and they aren’t giving me much info and is exacerbated by the time zone difference (going on a week now). Nothing seems to be out of the ordinary and it’s driving me nuts. Confirmed a valid emergency location is set (the same as our other 180 users). I’ve compared the output of Get-CsOnlineVoiceUser against another working user and all the details match (including SIPDomain, DataCenter, TenantId, LicenceState, PSTNConnectivity = True, UsageLocation and EnterpriseVoiceEnabled = True). I have confirmed licencing (including removing and re-adding the licence), I’ve confirmed the user’s TenantID and ObjectID is matching. I have tried multiple unassigned user numbers we have, even ones from completely different ranges. Try again later.” when assigning a number to this user.Īnd in PowerShell I get the following result using the updated Cmdlet above: In Teams Admin portal I get the error “We can’t save changes for number +61 X XXXX XXXX right now. Have either of you experienced issues assigning a phone number to a new user in both the Teams Admin portal & PowerShell over the last couple of weeks? I cannot assign a number to one specific new user (other new users created since have no problem) and the date I first noticed this issue seems to coincide with this post/Cmdlet Change (late Jan 2022).
I am also located in Australia and use Telstra / Teams Phone in my organisation. Hi Ben & Adam, First of all thank you for this post, it was very helpful. I’d suggest testing and migrating soon, before you miss the April deadline of the command being dropped. The options for -PhoneNumberType (required) are DirectRouting, CallingPlan and OperatorConnect. Read the documentation for more details Set-CsPhoneNumberAssignment -Identity -PhoneNumber +61987654321 -PhoneNumberType CallingPlan The new cmdlet Set-CsPhoneNumberAssignment doesn’t work exactly the same way as the old cmdlets.
If you’re feeling really brave, you can update all your modules with: Update-module *ĭisconnect or restart PowerShell or you’ll get problems running the new cmdlet if you had it connected while updating. To update, run the command: Update-module MicrosoftTeams Check the spelling of the name, or if a path was included, verify that the If you don’t have a version that supports this new command, you’ll get the error: Set-CsPhoneNumberAssignment : The term 'Set-CsPhoneNumberAssignment' is not recognized as the name of a cmdlet,įunction, script file, or operable program. They run under the MicrosoftTeams module for PowerShell, but you also need to make sure you have the latest version. Set-CsPhoneNumberAssignment and Remove-CsPhoneNumberAssignment I’d been allocating numbers with the Set-CsOnlineVoiceUser command. In summary, these commands are being deprecated “The retirement is planned to begin in early April and be complete by mid-April.” :Īnd Set-CSUser can’t be used to allocate phone numbers either. Microsoft has sent out an announcement on PowerShell changes for setting and removing phone numbers in Microsoft Teams:Ĭhanges coming to phone number assignment using Teams PowerShell Module cmdlets