Generate Comprehensive Mailbox Reports with PowerShell
Discover which mailboxes are in Exchange Online vs On-Premises with this powerful automation script
The Challenge
Managing a hybrid Exchange environment can be complex. IT administrators often struggle to get a clear overview of where their mailboxes are located – whether they’re still on the on-premises Exchange server or have been migrated to Exchange Online. This visibility is crucial for:
- Migration Planning – Track progress and identify remaining on-premises mailboxes
- Compliance Reporting – Understand data location for regulatory requirements
- License Management – Optimize Exchange Online licensing based on actual usage
- Troubleshooting – Quickly identify mailbox location when resolving user issues
The Solution
Our PowerShell script automatically connects to Exchange Online and generates a comprehensive HTML report showing all mailboxes and their locations. No more manual checking or guesswork!
Complete Visibility
See all mailbox types: User, Shared, Room, Equipment, and more
Location Detection
Automatically identifies Exchange Online vs On-Premises mailboxes
Interactive Reports
HTML output with filtering, sorting, and search capabilities
⚡ Quick Execution
Runs in minutes, even for large organizations
What You’ll Get
The script generates a professional HTML report containing:
Information | Description |
---|---|
Summary Dashboard | Overview statistics with visual charts |
Mailbox Inventory | Complete list with display name, email, and type |
Location Status | Clear indication of Exchange Online vs On-Premises |
Usage Statistics | Mailbox size, item count, and last logon time |
Interactive Features | Filter by location, search, and export options |
How to Use
Prerequisites
- PowerShell 5.1 or later
- Exchange Online PowerShell module
- Exchange Online administrator permissions
Installation Steps
Install-Module -Name ExchangeOnlineManagement -Force# Download and run the script
.\Generate-MailboxLocationReport.ps1
Advanced Features
Hybrid Environment Support
The script intelligently detects hybrid configurations and can identify:
- Cloud mailboxes (Exchange Online)
- On-premises mailboxes
- Mail-enabled users with cloud mailboxes
- Remote mailboxes in hybrid scenarios
Customization Options
Easily modify the script to include additional properties or customize the output format. The modular design makes it simple to extend functionality.
Troubleshooting
Common Issues
- Authentication Errors: Ensure you have proper Exchange Online permissions
- Missing Mailboxes: Check your administrative scope and permissions
- Slow Performance: Consider running during off-peak hours for large organizations
Includes script file, documentation, and usage examples
Why This Script?
This isn’t just another PowerShell script – it’s a complete solution designed by Exchange administrators for Exchange administrators. Features that set it apart:
- Production-Ready – Tested in real-world hybrid environments
- Error Handling – Robust error handling and logging
- Professional Output – Executive-ready HTML reports
- Extensible – Easy to modify and customize
- Well-Documented – Clear comments and usage instructions
Perfect For
IT Administrators
Managing hybrid Exchange environments
Migration Teams
Tracking Office 365 migration progress
Compliance Officers
Documenting data location for audits