Forum Discussion
Microsoft Teams PowerShell Module V2.3 - Set-CsUser broken!
- Apr 30, 2021
We had the same issue today and this is how we got round it:
- Run a PS session as Admin
- Uninstall-Module -Name MicrosoftTeams
- Install-Module -Name MicrosoftTeams -RequiredVersion 2.0.0
- Import-Module -Name MicrosfTeams
This then allowed us to progress and use the Set-CsUser command.
Oh dear. Any ideas which ones?
This seemed to execute ok, without any errors:
Set-CsUser -Identity user@doamin.com -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI "tel:+1234567890"
Note they've gone back to using -Identity !
- SivanandanRDec 13, 2021Copper Contributor
I came across the scenario where we move the user from Online To onpremises. After few days we again try to move the user from onpremises to online. When we do this operation it works for few case but few case it get failed. After failure the number also get sync to online.
Exception:System.Management.Automation.RemoteException: Can not update OnPremLineURI as the user has dirsynced onpremise LineURI.InnerException:
What's wrong with the command and I don't know how to troubleshoot this issue.
Plz help.
ONPREM OnPremScript Execution:Move-CsUser -Identity "YYYYYY@XXXX.com.sg" -Target "sipfed.online.lync.com" -HostedMigrationOverrideUrl "https://admin0f.online.lync.com/HostedMigration/hostedmigrationservice.svc" -DomainController "SP-IS-AD01" -Confirm:$false -UseOAuth -Credential $c OnPremScript Execution:Set-CsUser -Identity "YYYYYY@XXXX.com.sg" -EnterpriseVoiceEnabled $true -LineURI "tel:+6569167308;ext=7308" OnPremScript Execution:Grant-CsVoicePolicy -Identity "YYYYYY@XXXX.com.sg" -PolicyName $null OnPremScript Execution:Grant-CsVoiceRoutingPolicy -Identity "YYYYYY@XXXX.com.sg" -PolicyName $null OnPremScript Execution:Grant-CsDialPlan -Identity "YYYYYY@XXXX.com.sg" -PolicyName $null ONLINE OnLine Execution Script:Grant-CsTenantDialPlan -identity "YYYYYY@XXXX.com.sg" -policyname "AA-DialPlan-Teams" OnLine Execution Script:Grant-CsOnlineVoiceRoutingPolicy -Identity "YYYYYY@XXXX.com.sg" -PolicyName "VP-AA-Teams-Local" OnLine Execution Script:Grant-CsTeamsUpgradePolicy -Identity "YYYYYY@XXXX.com.sg" -PolicyName UpgradeToTeams OnLine Execution Script:Set-CsUser -Identity "YYYYYY@XXXX.com.sg" -EnterpriseVoiceEnabled $true -OnPremLineURI "tel:+65XXXX7308;ext=7308" -HostedVoiceMail $true PowerShellErrorCheck: Powershell Invoke Error: Exception:System.Management.Automation.RemoteException: Can not update OnPremLineURI as the user has dirsynced onpremise LineURI.InnerException: - vrallapalli034May 10, 2021Copper Contributor
And the New-CsOnlineSession makes a comeback!
The CS commands are now executing successfully.
Thank you guys for fixing the issue.
- ElazarOhayonMay 10, 2021Brass ContributorNew-CsOnlineAudioFile 2.3.1 MicrosoftTeams
Function New-CsOnlineBulkAssignmentInput 2.3.1 MicrosoftTeams
Function New-CsOnlineDateTimeRange 2.3.1 MicrosoftTeams
Function New-CsOnlineLisCivicAddress 2.3.1 MicrosoftTeams
Function New-CsOnlineLisLocation 2.3.1 MicrosoftTeams
Function New-CsOnlineNumberPortInOrder 2.3.1 MicrosoftTeams
Function New-CsOnlinePSTNGateway 2.3.1 MicrosoftTeams
Function New-CsOnlineSchedule 2.3.1 MicrosoftTeams
Function New-CsOnlineTimeRange 2.3.1 MicrosoftTeams
Function New-CsOnlineVoicemailPolicy 2.3.1 MicrosoftTeams
Function New-CsOnlineVoiceRoute 2.3.1 MicrosoftTeams
Function New-CsOnlineVoiceRoutingPolicy 2.3.1 MicrosoftTeams
New-CsOnlineSession not in the list.