Microsoft Teams PowerShell Tips&Tricks


Microsoft Teams PowerShell Release Notes (Minimum PowerShell version
5.1 for ):
https://learn.microsoft.com/en-us/MicrosoftTeams/teams-powershell-release-notes

Use a script as described in this article to keep your PowerShell modules updated:
https://office365itpros.com/2020/06/22/update-powershell-modules-m365/
Note on https://office365itpros.com/office-365-github-repository/: didn’t get why that ‘MicrosoftTeams’ thing comes twice at $O365Modules = @(“MicrosoftTeams”, “MicrosoftTeams”, “Microsoft.Graph”, “ExchangeOnlineManagement”, “Microsoft.Online.Sharepoint.PowerShell”, “ORCA”)

Assigning Policies to Multiple Teams Users:
https://office365itpros.com/2020/07/08/teams-bulk-policy-assignment/

Manage Teams with Microsoft Teams PowerShell:
https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-managing-teams

Microsoft Teams cmdlet help reference: https://learn.microsoft.com/en-us/powershell/teams/?view=teams-ps

Deprecated cmdlets:
https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions?source=recommendations

1. Open cmd as Administartor
2. Run powershell.exe -ExecutionPolicy AllSigned
3. Run Install-Module -Name MicrosoftTeams
4. Run Import-Module MicrosoftTeams
5. Type Connect-MicrosoftTeams and enter credentials when prompted
6. Type Get-Team and obtain GroupId from text like “Error retrieving Team with GroupId [84ff49fd-49d3-49c3-8219-ba05dbecb070]”

$Users = (Get-Team)
Foreach ($U in $Users) {
Write-Host “Team:” $U.DisplayName }
7. Get-TeamUser -GroupId %ID% -Role Owner

Leave a Comment

Your email address will not be published. Required fields are marked *

Click here to draw a picture to include in your comment.