One liner – List Microsoft Teams with their associated Office 365 group email address in Powershell

Working with a client we had a number of Office 365 Groups that were created with a non-publicly routable email domain, and as they were converted to Teams we were cleaning up the email addresses.

I needed a quick way to check which teams had been updated and which still needed to be done. Using the Exchange Online V2 and Teams PowerShell modules, the following simple one liner (once I had connected of course) returned the information I needed:

Connect-ExchangeOnline
Connect-MicrosoftTeams

(get-team).mailnickname | Get-UnifiedGroup | ft DisplayName,primarysmtpaddress

Leave a Reply

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