The PowerShell Module allows the IT professional to control Microsoft Teams by automating the creation of teams, channels, and settings within a team. Automating, simplifying, and streamlining daily tasks contributes to the success of Microsoft Teams within an organization.
Installing the Module from the PowerShell Gallery
1. As an Administrator, type PowerShell in the start menu. Right-click Windows PowerShell, then select Run as Administrator. Click Yes at the UAC prompt.
2. Type the following within PowerShell and then press Enter:
3. Type Y at the prompt. Press Enter.
4. If you are prompted for an untrusted repository, then type A (Yes to All) and press Enter. The module will now install.
Once installed, you can now connect to Microsoft Teams.
Connecting to Microsoft Teams
1. Type the following and press Enter:
2. The Microsoft Teams PowerShell Cmdlets dialog box will now appear. Type in your Office 365 credentials. When done, press Enter.
3. The following will display once you are connected to the Microsoft Teams instant in your Office 365 tenant:
With these steps completed, you can now begin to run cmdlets, or scripts, against Microsoft Teams.
TIP: To see a full list of commands that are available, type Get-Command-Module MicrosoftTeams
In the following table, currently available commands in PowerShell are described below along with a brief description of what that command performs:
It is important to remember that Teams use the same ID as the Office 365 Groups they are a part of and when creating a Team, a group is automatically created. However, an Office 365 Group does not, by default, create a Team.
Microsoft Teams and PowerShell provides tools for the IT professional resulting in simpler administration with the flexibility to customize controls accessible to the end-user, control over current and future governance of Microsoft Teams, and creative possibilities of standardizing Team settings, creating a self-service tool on the back-end for end-users to create Teams but with controls for IT and creating a *.csv file when creating large teams and/or adding numerous members to an existing Team.
Microsoft Teams and PowerShell combine to provide a rich and powerful tool for the IT professional.