Forum Discussion
ecwc110997
Jul 12, 2022Copper Contributor
OnPremLineURI will be deprecated. Please use LineurI to update user's phone number
Hi
All Along i have been using this codes to run and assign Phone Number to Microsoft Teams but recently there is a warnings :"OnPremLineURI Will be deprecated Please use LineURI to update user's phone number"
Set-CsUser -Identity ""emailaddress" -OnPremLineURI tel:+6562129187 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true
Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity "emailaddress"
Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity "emailaddress"
Grant-CsOnlineVoiceRoutingPolicy -PolicyName "Singapore" -Identity "emailaddress"
Grant-CsTenantDialPlan -PolicyName Singapore -Identity "emailaddress"
- janglissSteel Contributor
I'm assuming the question is "what's the alternative"? Microsoft announced the deprecation of the older PowerShell modules via admin center message MC350371 (https://admin.microsoft.com/Adminportal/Home?#/MessageCenter/:/messages/MC350371). There are details on supported versions here https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions
The syntax for the new command is as such:Set-CsPhoneNumberAssigment -Identity emailaddress -PhoneNumber "+1234567890" -PhoneNumberType DirectRouting
This assumes you're using direct routing. You can see https://docs.microsoft.com/en-us/powershell/module/teams/set-csphonenumberassignment?view=teams-ps for full syntax.
- BilStenCopper Contributor
Hi jangliss
using the new command: Set-CsPhoneNumberAssigment -Identity email address removed for privacy reasons -PhoneNumber "+341829" -PhoneNumberType DirectRouting
Gives me the following error:
Set-CsPhoneNumberAssigment : The term 'Set-CsPhoneNumberAssigment' is not recognized as the name of a cmdlet, function, script file, or program
executable. Check if you typed the name correctly or if you included a path, check that the path is correct and try again.
new.
Online: 1 Character: 1
+ Set-CsPhoneNumberAssigment -Identity email address removed for privacy reasons -PhoneNumber "+3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-CsPhoneNumberAssigment:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionCan you help me please? Thanks!