🔁 Step-by-Step Guide: Restoring Primary and Archive Mailboxes in Exchange Online via PowerShell
Mailbox restoration is a critical operation in any Microsoft 365 environment, especially when a user’s mailbox has been removed, replaced, or re-provisioned. Whether you’re recovering a deleted mailbox or restoring mailbox content to a newly created user, Exchange Online offers a powerful way to perform this using PowerShell.
This guide walks you through the process step-by-step—including how to identify mailbox GUIDs and restore primary and archive mailboxes.
✅ Prerequisites
- Global or Exchange Administrator rights
- Exchange Online PowerShell module installed
- Target mailbox created and licensed
- Mailbox should be empty for clean restoration
🧭 Step 1: Connect to Exchange Online PowerShell
Connect-ExchangeOnline -UserPrincipalName youradmin@domain.com
🔍 Step 2: Get Mailbox GUIDs
2.1 Source Mailbox GUID
Get-Mailbox -SoftDeletedMailbox -Identity user@domain.com | Select DisplayName, ExchangeGUID
2.2 Target Mailbox GUID
Get-Mailbox -Identity newuser@domain.com | Select DisplayName, ExchangeGUID
📦 Step 3: Archive Mailbox Explained
An archive mailbox is additional mailbox storage for older emails. It supports auto-expanding storage up to 1.5 TB. Enable it using:
Enable-Mailbox -Identity user@domain.com -Archive
🔄 Step 4: Restore Primary Mailbox
New-MailboxRestoreRequest -SourceMailbox <Source-GUID> -TargetMailbox <Target-GUID> -AllowLegacyDNMismatch
📂 Step 5: Restore Archive Mailbox
New-MailboxRestoreRequest -SourceMailbox <Source-GUID> -SourceIsArchive -TargetMailbox <Target-GUID> -TargetIsArchive -AllowLegacyDNMismatch
📊 Step 6: Monitor Restore Progress
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
🧹 Step 7: Cleanup
Get-MailboxRestoreRequest -Mailbox newuser@domain.com | Remove-MailboxRestoreRequest
📝 Additional Tips
- Restore requests merge content; they do not overwrite
- Valid within soft-deletion retention (default 30 days)
- Use
-AllowLegacyDNMismatchif DN doesn’t match
📬 Conclusion
Using PowerShell for mailbox restoration in Exchange Online ensures full control and detailed monitoring. Following this guide helps restore both primary and archive mailbox content safely and efficiently.
Discover more from ComputerCarriage
Subscribe to get the latest posts sent to your email.

Leave a Reply