Microsoft Teams PowerShell Flags & Options
The MicrosoftTeams module: teams, policies, voice and meeting settings.All Microsoft Teams PowerShell pages
- Add-TeamUser -Role Owner: add an owner (or member) to a Microsoft TeamAdd-TeamUser -Role Owner adds a team owner; without -Role the user is a Member. ValidateSet values checked offline, demoting with Remove-TeamUser -Role Owner.
- Connect-MicrosoftTeams -TeamsEnvironmentName: TeamsGCCH, TeamsDOD, TeamsChinaConnect-MicrosoftTeams -TeamsEnvironmentName TeamsGCCH, TeamsDOD or TeamsChina connects to a sovereign cloud. GCC and commercial tenants should not use it.
- Connect-MicrosoftTeams -UseDeviceAuthentication: sign in with a device codeConnect-MicrosoftTeams -UseDeviceAuthentication signs in with a device code from any browser. Works in Windows PowerShell 5.1 too; parameter set and limits.
- Get-CsOnlineUser -Filter: find Teams users by policy, phone number or account typeGet-CsOnlineUser -Filter finds Teams users by policy, LineURI, feature type or account type on the server. Syntax, quoting, examples and filter limitations.