Required modules
Install the appropriate module before running scripts in each category.| Module | Service | Install command |
|---|---|---|
ExchangeOnlineManagement | Exchange Online | Install-Module ExchangeOnlineManagement |
Microsoft.Online.SharePoint.PowerShell | SharePoint Online | Install-Module Microsoft.Online.SharePoint.PowerShell |
MicrosoftTeams | Teams | Install-Module MicrosoftTeams |
Microsoft.Graph | Azure AD / Entra ID | Install-Module Microsoft.Graph |
AzureAD | Azure AD (legacy) | Install-Module AzureAD |
Microsoft.Graph | MS Graph API | Install-Module Microsoft.Graph |
PowerShell 7+ is recommended for all Microsoft 365 modules. PowerShell 5.1 is supported but some modules may have limited functionality.
Connecting to each service
Each service requires its own connection command. Run these before executing any scripts.Script categories
Exchange & Exchange Online
Mailbox management, distribution groups, mail flow rules, and mailbox size reporting.
SharePoint & Teams
Site management, permissions, team provisioning, channel operations, and membership.
Azure AD & Entra ID
User management, group administration, and Conditional Access policy automation.
Microsoft Graph API
Cross-service automation using the Microsoft Graph PowerShell SDK.
Prerequisites
All scripts in this section require:- A Microsoft 365 tenant with appropriate licensing
- An account with sufficient administrative permissions for the target service
- PowerShell 5.1 or later (PowerShell 7+ recommended)
- The relevant PowerShell module installed and imported
