r/PowerShell • u/KavyaJune • Jun 10 '25
Script Sharing PowerShell Scripts for Managing & Auditing Microsoft 365
I’ve put together a collection of 175+ PowerShell scripts focused on managing, reporting, and auditing Microsoft 365 environments. Most of these are written by me and built around real-world needs I’ve come across.
These scripts cover a wide range of tasks, including:
Bulk license assignment/removal
M365 user offboarding
Detecting & removing external email forwarding
Configuring email signatures
Identifying inactive or stale accounts
Monitoring external file sharing in SPO
Tracking deleted files in SharePoint Online
Auditing mailbox activity and email deletions
Reporting on room mailbox usage
Exporting calendar permissions
Checking Teams meeting participation by user
OneDrive usage report
And lots more...
Almost all scripts are scheduler-friendly, so you can easily schedule them into Task Scheduler or Azure Automation for unattended execution.
You can download the scripts from GitHub.
If you have any suggestions and script requirements, feel free to share.
7
u/mrmattipants Jun 10 '25
I looked over the scripts earlier and they all appear to be up-to-date.
Unfortunately, there are still a number of Exchange related tasks/actions that you can't perform in the Graph API, as of yet.
I personally found this out while I was working on writing an Off-boarding Script, particularly when I got to the point where the Users are Removed from All Online Group Memberships, simply because the EXOv3 Module is required to manage Distribution Groups/Lists, in specific.