Finding Teams without Owners via PowerShell

Pleasant greetings to your and yours in the New Year! In this article, I'm going to talk about using PowerShell to identify Microsoft Teams without owners.

Behind every team in Microsoft Teams is a M365 Group. The group contains both owners and members. M365 Groups can create governance issues - especially when owners leave and there isn't a secondary owner.

If you're like me, you've dealt with this problem. In my case, I decided to write a script to go thru all the M365 Groups in my tenant and create a report with the name, email, members, and creation date for each group used by a team. The script is available in my GitHub.

Here's a screenshot of the report produced by the script:

NOTE: The attached CSV contains the same data as the table in the report.

Hopefully you find this script useful. Cheers!