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;
Connect-MicrosoftTeams
Get GroupId of the Team group
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 'finan'
GroupId DisplayName Visibility Archived MailNickName Description
------- ----------- ---------- -------- ------------ -----------
f427cfdc-832f-4119-ab73-7ae4fdc5a70b GL-Finance Private False GL-Finance GL-Finance
Fill in CSV file
I also have a CSV file with a list of all the new channels and which type they are.
Parent text
Tooltip
text here!
$GroupId = 'f427cfdc-832f-4119-ab73-7ae4fdc5a70b'
Import-Csv C:\Temp\Channels.csv |
Foreach { New-TeamChannel -GroupId $GroupId -DisplayName $_.DisplayName -MembershipType $_.Type}
5/5 - (1 vote)