M365 Powershell Modules
Overview
The following is a list of Powershell modules that are utilized for M365.
1. Microsoft Graph PowerShell Module
Module Name:
Microsoft.GraphPurpose: Allows interaction with Microsoft Graph API, which provides unified access to Microsoft 365 services.
Usage Example:
Connect-MgGraph -Scopes "User.Read.All" Get-MgUser -UserId user@domain.comKey Features: Unified access to Azure AD, Exchange, Teams, SharePoint, and more through a single API.
2. Exchange Online PowerShell Module
Module Name:
ExchangeOnlineManagement(also referred to asEXO V2)Purpose: Used for managing Exchange Online resources, mailboxes, and settings.
Usage Example:
Connect-ExchangeOnline -UserPrincipalName admin@domain.com Get-Mailbox -RecipientTypeDetails UserMailboxKey Features:
Supports modern authentication.
Used for email flow, mailbox permissions, and message trace activities.
3. Microsoft Teams PowerShell Module
Module Name:
MicrosoftTeamsPurpose: Used for managing Microsoft Teams settings and policies.
Usage Example:
Connect-MicrosoftTeams Get-TeamKey Features:
Manage Teams, channels, policies, and users.
Control guest access and Teams usage.
4. SharePoint Online PowerShell Module
Module Name:
SharePointPnPPowerShell(for PnP operations) andMicrosoft.Online.SharePoint.PowerShellPurpose: Used for managing SharePoint Online sites, libraries, and permissions.
Usage Example:
Connect-PnPOnline -Url https://tenant.sharepoint.com Get-PnPSiteKey Features:
PnP module provides enhanced capabilities for automation.
Manage document libraries, site collections, and access policies.
5. Azure AD (Entra ID) PowerShell Module
Module Name:
AzureAD(for legacy operations) andAzureAD.Standard.PreviewPurpose: Used for managing Azure AD users, groups, and devices.
Usage Example:
Connect-AzureAD Get-AzureADUser -ObjectId user@domain.comKey Features:
Manage users and group memberships.
Enforce Conditional Access policies.
6. Security & Compliance PowerShell Module
Module Name:
ExchangeOnlineManagement(for compliance) andSecurity & Compliance PowerShellPurpose: Used for managing Microsoft 365 Security and Compliance settings, including DLP, audits, and eDiscovery.
Usage Example:
Connect-IPPSSession Get-ComplianceSearchKey Features:
Manage data loss prevention (DLP) policies.
Perform eDiscovery searches and manage audit logs.
Last updated