This script produces a report of the membership of Office 365 admin role groups. The report is output to CSV file.
This script relies on the AzureAD PowerShell module, which you can install from the PowerShell Gallery.
- Download the latest release from the TechNet Script Gallery.
- Run the script using the usage examples below. You will be prompted to authenticate to Azure AD if you are not already connected.
-
ReportFile - You can provide a custom output file name. The file name you specify will be modified with the current date, for example MyReportFileName.csv will become MyReportFileName-ddMMyyyy.csv. If a file of the same name exists, a unique character string will also be appended to the file name.
-
Overwrite - Overwrites an existing report file of the same name, instead of appending a unique character string.
.\Get-O365AdminGroupsReport.ps1
.\Get-O365AdminGroupsReport.ps1 -ReportFile MyReportFileName.csv -Overwrite
.\Get-O365AdminGroupsReport.ps1 -Verbose
Written by: Paul Cunningham
Find me on:
- My Blog: https://paulcunningham.me
- Twitter: https://twitter.com/paulcunningham
- LinkedIn: https://au.linkedin.com/in/cunninghamp/
- Github: https://github.com/cunninghamp
Check out my books and courses to learn more about Office 365 and Exchange Server.