Bulk Converting Office 365 Groups to Teams

Bulk Converting Office 365 Groups to Teams

  • 5

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 


Published by Aaron Guilmette

Helping companies conquer inferior technology since 1997. I spend my time developing and implementing technology solutions so people can spend less time with technology. Specialties: Active Directory and Exchange consulting and deployment, Virtualization, Disaster Recovery, Office 365, datacenter migration/consolidation, cheese.

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.


Leave a Reply

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