Have you ever run into a situation where you need to audit all your clients Microsoft 365 Environments for a particular report or set of information.
Recently I came across across the need to audit global admins on all tenancies to monitor where we had an account. Rather than logging into each tenancy (a lot), I decided to write a script to make this process more seamless.
Pr-Requisites
- Microsoft account with access to the Partner Portal
- PowerShell v 3.0 or higher with MSOnline module installed (see below)
#Get your current PowerShell Version
$Psversiontable.PSVersion
#Install the Microsoft Online PowerShell Mdoule
Install-Module MSOnline
What can you do with this script?
- Obtain all Partner Relationships
- Display all Partners licenses along with Active vs Consumed (Targets license < 1000 units)
- Obtain all Global admins across all your customers with MFA status
- Export all licenses and filter by client
- Export all Global admins
I plan to continue adding to this script and the latest version will be available on GitHub.
Download
Download/Save from Github O365_Partner_MGMT.ps1