M365 Toolkit
A collection of PowerShell scripts for Microsoft 365 administrators.
Getting Started
Download Scripts
-
Clone or download the repository:
-
Navigate to the
scripts/folder and run scripts directly:
Standalone Scripts
Each script page in this documentation includes a Full Script section with all helper functions inlined. You can copy the complete standalone script and run it anywhere without needing the helper files.
Requirements
Scripts require the following PowerShell modules. Scripts will use either Graph or PnP, not both simultaneously.
| Module | Version | Purpose |
|---|---|---|
Microsoft.Graph |
2.34.0+ | Microsoft Graph API |
PnP.PowerShell |
3.1.0+ | SharePoint API |
ImportExcel |
7.8.10+ | Excel export functionality |
Install dependencies:
Install-Module Microsoft.Graph -Scope CurrentUser -Force
Install-Module PnP.PowerShell -Scope CurrentUser -Force
Install-Module ImportExcel -Scope CurrentUser -Force
Getting Help
Each script includes comment-based help. Use PowerShell's built-in help system: