
With the Microsoft Teams PowerShell module you manage Teams faster than in the admin center: create teams, add members in bulk, assign policies or build reports. This article shows how to install the module, connect and use a few handy commands.
Install the module
- Open PowerShell 7 (recommended) or Windows PowerShell 5.1. Read install PowerShell 7.
- Type: Install-Module -Name MicrosoftTeams -Scope CurrentUser
- Confirm the PSGallery prompt with Y (or A for all).
Update later with Update-Module MicrosoftTeams.

Connect
Type Connect-MicrosoftTeams. A sign-in window opens; sign in with an admin account and confirm with MFA. You need at least the Teams Administrator role. Disconnect with Disconnect-MicrosoftTeams.
Handy commands
| Command | What it does |
|---|---|
| Get-Team | List all teams |
| New-Team -DisplayName "Sales" -Visibility Private | Create a private team |
| Add-TeamUser -GroupId <id> -User john@contoso.com | Add a member |
| New-TeamChannel -GroupId <id> -DisplayName "Quotes" | Create a channel |
| Get-CsTeamsMeetingPolicy | List meeting policies |
| Grant-CsTeamsMeetingPolicy -Identity john@contoso.com -PolicyName "Students" | Assign a policy to a user |
Adding many members? Read add multiple members at once.
Tips
- Find a command with Get-Command -Module MicrosoftTeams *channel*.
- For unattended scripts, use an app registration with a certificate.
- Managing Exchange too? See the Exchange Online PowerShell module.
Nederlandstalige versie: De Microsoft Teams PowerShell-module installeren en gebruiken
Related articles
▸20 handy PowerShell scripts to manage Microsoft Teams20 short scripts with the MicrosoftTeams module: manage teams, members and channels, archive teams, assign…
▸Add multiple users to a team at once in Microsoft TeamsAdd many members to a team at once: through a group, with PowerShell and a CSV file, or automatically with…
▸Turn on multilingual Teams meeting invitationsShow the join information in Teams invitations in two languages with MeetingInviteLanguages in PowerShell…
▸PowerShell for Microsoft 365: a guide for beginnersWhich PowerShell modules do you need for Microsoft 365, how do you connect and which commands do you try…
▸Install the Exchange Online PowerShell module (ExchangeOnlineManagement)Install the ExchangeOnlineManagement module, learn what changed since V2 and connect to Exchange Online with…