Microsoft Teams – PowerShell #2

Hi there

At this post I’m covering basic tasks on Microsoft Teams using PowerShell.

1. Connecting to Microsoft Teams – Available commands.

#Microsoft Teams Management

#install module
Install-Module -Name MicrosoftTeams -Force

#import module
Import-Module MicrosoftTeams

#connect teams

2. Creating New Teams

#create a private team name Team-01
New-Team -DisplayName “Team-01” -Visibility Private

#create a public team named Team-02
New-Team -DisplayName “Team-02” -Visibility Public

3. Creating New Teams Channel (create a team channel on Team-01), you need to retrieve Team-01 groupid on powershell

#create a new team channel under "Team-01" 
Get-AzureADGroup -SearchString "Team-01"

New-TeamChannel -GroupId 126b90a5-e65a-4fef-98e3-d9b49f4acf12 -DisplayName "Engineering" -MembershipType Private

4. Creating a New Application Setup Policy

TIP: when you create a new application policy Microsoft Teams use Org-wide Default as template. (all teams apps enabled on your current Org-wide default policy will copied over to the new policy)

#create a new teams application setup policy
New-CsTeamsAppSetupPolicy -Description Full-Experience -Identity App-Setup-Policy-01 -Confirm:$true

5. Creating a New Live Events Policy

#List all current live events policies
Get-CsTeamsMeetingBroadcastPolicy -identity Global

#Create a new Live Event policy (Teams Meeting Broadcast Policy)
New-CSTeamsMeetingBroadcastPolicy -identity AllowLiveEvents

#Set this policy to allow live events (True)
Set-CsTeamsMeetingBroadcastPolicy -identity AllowLiveEvents -AllowBroadcastScheduling $true

#Assign this policy to a user
Grant-CsTeamsMeetingBroadcastPolicy -Identity -PolicyName AllowLiveEvents -Verbose
#Clear the live event policy from a user
Grant-CsTeamsMeetingBroadcastPolicy -Identity -PolicyName $null -Verbose

Download the powershell content file from here.


Microsoft Teams Powershell module.
Microsoft Skype for Business Powershell module.


Thiago Beier