Skip to main content

Teams

PowerShell for administering Microsoft Teams. Most scripts here use the MicrosoftTeams module; the activity report uses Microsoft Graph (see Microsoft 365 — Overview & Connection).

Scripts​

The order worth running them in​

Ownership first: it is the governance problem that blocks every other fix, because a team nobody owns cannot have its membership corrected. Inactive second, to know which of those teams anyone would miss. External access is tenant-wide configuration rather than per-team, and it determines whether the guest findings in the first report were ever possible — worth reading before you start removing people.

Tip — Get-Team is slow before it is anything else

Enumerating every team in a large tenant takes a noticeable while and produces no output until it finishes. The scripts log before and after the call so a long silence is identifiable rather than alarming.