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?
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.
- captain_jackCopper Contributor
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.
- NARASA SARAT MEDAPALLICopper Contributor
LinusCansby What should be the .csv file look like. I used the userpricipalname in tab and the user name below it? That did not help me. Please share if there is an example file. Thanks
Header with SipAddress and then one sip address per row:
SipAddress
user1@contoso.comuser2@contoso.com
- Ram_vignesh1987Copper Contributor
PS C:\Users\Ram_Vignesh> cd c:\
PS C:\> $Users = Import-Csv -Path c:\users.csv
PS C:\> foreach($User in $Users)
>> { Grant-CsTeamsUpgradePolicy -Identity $User. UserPrincipalName -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:2 char:3
+ { Grant-CsTeamsUpgradePolicy -Identity $User. UserPrincipalName -Poli ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Grant-CsTeamsUpgradePolicy:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionfacing the error could tell me the reason for the error
- NARASA SARAT MEDAPALLICopper Contributorforeach($User in $Users)
{
Grant-CsTeamsUpgradePolicy -Identity $User.SipAddress -PolicyName UpgradeToTeams
}
Cannot validate argument on parameter 'Identity'. The argument is null or empty. Provide an argument that is not null or empty, and
then try the command again.
+ CategoryInfo : InvalidData: (:) [Grant-CsTeamsUpgradePolicy], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Rtc.Management.AD.Cmdlets.AssignCSTeamsUpgradePolicyCmdlet
+ PSComputerName : admin3a.online.lync.com
- Ram_vignesh1987Copper Contributor
can you send me to my email address ramece1987@gmail.com for the further explaination i want to complete the 100 user to activat teams useing powershell script