Bulk Converting Office 365 Groups to Teams

Bulk Converting Office 365 Groups to Teams

  •  
  •  
  •  
  •  
  •  
  •  
Bulk Converting Office 365 Groups to Teams
5 (100%) 3 vote[s]

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!

Reader Comments

  1. Nice work on cobblng together something that MS should have sorted! I assume this PS script wouldnt do anything to move any documents etc currently within the O365 Group to the new Team?

    Or would it?!

    If not the only way i have found to move these is a painful, manual process unless you know of an easier way.

    Thanks

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.