A comprehensive collection of PowerShell scripts and modules for Microsoft 365, Exchange Server, Active Directory, and Azure administration.
This repository consolidates years of practical PowerShell scripts used for enterprise IT administration. Originally developed for managing hybrid Exchange environments, Microsoft 365 tenants, and Active Directory infrastructures.
| Module | Description |
|---|---|
| Calendar | Calendar management, logging, and restoration scripts |
| Connectors | Mail connectors and certificate management |
| DKIM | DKIM/DMARC configuration scripts |
| DL-Groups | Distribution list and group management |
| EWS | Exchange Web Services scripts |
| Hybrid-Delegation | Hybrid delegate access configuration |
| IntraorgConnector | Internal organization connector setup |
| Mailbox | Mailbox operations (delete, restore, recovery) |
| OOO | Out of Office management |
| PublicFolder | Public folder administration |
| Quarantine | Quarantine and spam management |
| RemoteMailbox | Remote and shared mailbox management |
| Retention | Retention policies and holds |
| Rooms | Room and resource mailbox management |
| Spamfilter | Spam and phishing filter configuration |
| TrackingLog | Message tracking and logs |
| Module | Description |
|---|---|
| MSGraph | Microsoft Graph API scripts and modules |
| Teams | Microsoft Teams administration |
| Bookings | Microsoft Bookings management |
| SCC | Security & Compliance Center scripts |
| Oauth | OAuth authentication and tokens |
| AuditLogs | Audit log queries and exports |
| InformationBarriers | Information barrier policies |
| Module | Description |
|---|---|
| AD-Management | Active Directory user and group management |
| AD-Groups | AD group operations |
| USERimport | User import and license assignment |
| Permissions | AD and folder permission management |
| Module | Description |
|---|---|
| OLK | Outlook client configuration and registry fixes |
| OWA | Outlook Web Access configuration |
| Signature | Email signature management |
| SMime | S/MIME encryption configuration |
| Mobile | Mobile device management |
| Module | Description |
|---|---|
| HCW | Hybrid Configuration Wizard scripts |
| Migrationendpoints | Migration endpoint configuration |
| SMTP | SMTP relay and migration |
| IMAP-Migration | IMAP migration tools |
| Module | Description |
|---|---|
| FolderStats | Folder statistics and analysis |
| Logs | Log parsing and analysis |
| Screenshots | Documentation screenshots |
| Module | Description |
|---|---|
| CONNECT | Connection scripts for various services |
| RBAC | Role-based access control |
| Misc | Miscellaneous utilities |
# Basic connection
Connect-ExchangeOnline -UserPrincipalName admin@domain.com
# With MFA
Connect-ExchangeOnline -UserPrincipalName admin@domain.com -ShowBanner:$false# Using the MSGraph module
Import-Module ./M365/MSGraph/GraphOffice365Module.psm1
Connect-MgGraph -Scopes "User.Read.All","Group.ReadWrite.All"PShell/
├── AD/ # Active Directory scripts
├── Exchange/ # Exchange Server & Online scripts
│ ├── Calendar/
│ ├── Connectors/
│ ├── DKIM/
│ ├── DL-Groups/
│ ├── EWS/
│ ├── Hybrid-Delegation/
│ ├── Mailbox/
│ ├── OOO/
│ ├── PublicFolder/
│ ├── Quarantine/
│ ├── RemoteMailbox/
│ ├── Retention/
│ ├── Rooms/
│ ├── Spamfilter/
│ └── TrackingLog/
├── M365/ # Microsoft 365 cloud scripts
│ ├── MSGraph/
│ ├── Teams/
│ ├── Bookings/
│ ├── SCC/
│ ├── Oauth/
│ ├── AuditLogs/
│ └── InformationBarriers/
├── Migration/ # Migration tools
│ ├── HCW/
│ ├── Endpoints/
│ ├── SMTP/
│ └── IMAP/
├── Outlook/ # Outlook client scripts
│ ├── OWA/
│ ├── Signature/
│ ├── SMime/
│ └── Mobile/
├── Reporting/ # Reporting and analysis
│ ├── FolderStats/
│ ├── Logs/
│ └── Screenshots/
├── Utilities/ # General utilities
│ ├── RBAC/
│ └── Misc/
└── Docs/ # Documentation
- PowerShell 5.1 or PowerShell 7+
- Exchange Online Management Module
- Microsoft Graph PowerShell SDK
- Azure AD PowerShell Module (legacy) or Microsoft Graph
- Appropriate admin permissions for your tenant/environment
# Install required modules
Install-Module ExchangeOnlineManagement -Force
Install-Module Microsoft.Graph -Force
Install-Module AzureAD -Force # Legacy, use Microsoft.Graph where possibleAdditional documentation and guides are available in the Docs folder, including:
- Connection guides
- Troubleshooting tips
- Best practices
- Migration checklists
This is a consolidation of scripts from multiple specialized repositories:
- PShell (main collection)
- MSGraph
- AD
- OLK
- O365Docs
- Calendar
- SMime
- And more...
Feel free to submit issues and pull requests for improvements.
These scripts are provided as-is for educational and administrative purposes.
Last updated: December 2025