Bulk Converting Office 365 Groups to Teams
This week, while working with one of my peers, a request came in to bulk convert all Office 365 groups to Microsoft Teams. In the Teams UI, you're only presented the choice to upgrade groups you own, one at a time, to Teams.
Anything UI can do, scripting does better. Scripting does everything better than UI.
No, it doesn't! [Yes, it does!] No, it doesn't! [Yes, it does!]
I think we all know how I feel about this.
So, in order to make this magic work, you'll need to:
- Microsoft Teams PowerShell Model (Install-Module MicrosoftTeams)
- Connect to Exchange Online PowerShell
- Connect to Teams (Connect-MicrosoftTeams)
$UnifiedGroups = Get-UnifiedGroup -ResultSize Unlimited
$Teams = Get-Team
foreach ($Group in $UnifiedGroups)
{ If (!($Teams.GroupId -match $group.ExternalDirectoryObjectId))
{
New-Team -Group $Group.ExternalDirectoryObjectId
}
}
Voila!