Private or Standard Channel
Microsoft Teams offers three types of channels.
- Private – Offer limited access to team members and block access to all other Team members.
- Standard – Allow access to all members of the Team.
- Shared: Shared channel cross tenants.
Connect to Microsoft Teams PowerShell
Microsoft Teams PowerShell Modunle
You need install Microsoft Teams module only once. In the next time, run to connect to Microsoft Teams PowerShell.
##Install Modunle and Connect to Microsoft Teams
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name MicrosoftTeams;
Update-Module -Name MicrosoftTeams;
Connect-MicrosoftTeams
Get GroupId
We need to find the GroupId value of the Team we would like to create all the channels
PS C:\WINDOWS\system32> Get-Team -Displayname 'florida'
GroupId DisplayName Visibility Archived MailNickName Description
------- ----------- ---------- -------- ------------ -----------
660a5081-ea4b-49aa-b552-db50d903217d ROD_Florida Public False msteams_ede239 Florida
Fill in CSV file
I also have a CSV file with a list of all the new channels and which type they are.
$GroupId = '660a5081-ea4b-49aa-b552-db50d903217d'
Import-Csv C:\Temp\Channels.csv |
Foreach { New-TeamChannel -GroupId $GroupId -DisplayName $_.DisplayName -MembershipType $_.Type}
5/5 - (1 vote)