Forum Discussion
Chad Rodriguez
Sep 11, 2019Copper Contributor
Move some users to "Teams Only" mode with powershell
Does anyone have a script that will move users in bulk from islands mode to ms teams only please?
- Sep 11, 2019
This is a simple script that reads sip address from a csv file and change mode.
$Users = Import-Csv -Path c:\temp\users.csv foreach($User in $Users) { Grant-CsTeamsUpgradePolicy -Identity $User.SipAddress -PolicyName UpgradeToTeams }
If you want to change for all users in your organisation you can change the default mode instead. Teams Admin Center > Org-wide Settings > Teams Upgrade, change Coexistence mode to Teams only.
Chad Rodriguez
Sep 11, 2019Copper Contributor
Linus will this work if i have a current csv with a column titled: UserPrincipalName username@company.com ?
Chad Rodriguez
Sep 11, 2019Copper Contributor
I get this error: $Users = Import-Csv -Path c:\temp\TeamsOnlyMode.csv foreach($User in $Users) { Grant-CsTeamsUpgradePolicy -Identity $User.SipAddress -PolicyName UpgradeToTeams } Grant-CsTeamsUpgradePolicy : The term 'Grant-CsTeamsUpgradePolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:6 char:1 + Grant-CsTeamsUpgradePolicy -Identity $User.SipAddress -PolicyName Upg ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Grant-CsTeamsUpgradePolicy:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException