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
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
PS C:\WINDOWS\system32> Get-TeamChannel -GroupId f427cfdc-832f-4119-ab73-7ae4fdc5a70b
Id DisplayName Description MembershipType
-- ----------- ----------- --------------
19:41fd9aa8235f466885523f74dfe4825e@thread.tacv2 Berlin Private
19:4fca62416bf24b25a8fe701b8a49ef3e@thread.tacv2 Milan Private
19:65f8ed4ae0a3462fa69889aff7061d64@thread.tacv2 London Private
19:94a8060a2e414fdd8f87cf6e5fc525d3@thread.tacv2 Madrid Private
19:e21a3f04f0604647824ed2bb1dcac96c@thread.tacv2 Paris Private
19:SZ7S9m1LMProQhovokfaZ0wptAVyYQn0_gXS4i0iT-g1@thread.tacv2 General GL-Finance Standard
Import-Csv C:\Temp\Members.csv |
Foreach { Add-TeamChannelUser -GroupId $_.GroupId -DisplayName $_.DisplayName -User $_.User}
5/5 - (1 vote)