Forum Discussion
Move some users to "Teams Only" mode with powershell
- 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.
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.
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 : CommandNotFoundException
facing the error could tell me the reason for the error
- NARASA SARAT MEDAPALLIJul 24, 2020Copper 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 - LinusCansbyMay 18, 2020MVP
Ram_vignesh1987 Check this document to download Skype for Business Online powershell module and then how to connect to SfB Online to run the command.