Exchange ServerHow-to

Recover a deleted mailbox in Exchange Server: Connect-Mailbox and restore requests

Deleted or disabled the wrong mailbox? Find it among the disconnected mailboxes, reconnect it or merge it into another mailbox before the retention period runs out.

Someone disabled the wrong mailbox, or deleted a leaver's account before the manager had copied what they needed. On Exchange Server that's usually recoverable without a backup, because the mailbox data stays in the database for a while after the account link is gone. In this post I'll show how to find the disconnected mailbox, choose between reconnecting and restoring, run either option and check the result.

How this guide is organized: How it works → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (5 steps: Check the retention window; Find the disconnected mailbox; 3a. Reconnect it to a user account; 3b. Or restore its content into an existing mailbox; Keep old replies and cached addresses working). 3. Verify. 4. Tips & gotchas. Toolbox: Remove-Mailbox, Connect-Mailbox, Disable-Mailbox, Recipients › Mailboxes, MailboxGuid.1How it works2Step-by-step3Verify4Tips & gotchas1Check the retentionwindow2Find thedisconnected mail…33a. Reconnect it toa user account43b. Or restore itscontent into an ex…5Keep old repliesand cached addre…TOOLBOXRemove-MailboxConnect-MailboxDisable-MailboxRecipients › MailboxesMailboxGuidHow this guide is organized: How it works → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (5 steps: Check the retention window; Find the disconnected mailbox; 3a. Reconnect it to a user account; 3b. Or restore its content into an existing mailbox; Keep old replies and cached addresses working). 3. Verify. 4. Tips & gotchas. Toolbox: Remove-Mailbox, Connect-Mailbox, Disable-Mailbox, Recipients › Mailboxes, MailboxGuid.1How it works2Step-by-step1Check the retention window2Find the disconnected mailbox33a. Reconnect it to a user account43b. Or restore its content into an existingmailbox5Keep old replies and cached addresses working3Verify4Tips & gotchasTOOLBOXRemove-MailboxConnect-MailboxDisable-MailboxRecipients › MailboxesMailboxGuid
At a glance: how this guide is organized · 5 steps · 5 key settings and tools

How it works#

A mailbox is two things: the Exchange attributes on an Active Directory user, and the mailbox data in a database. A disconnected mailbox is mailbox data that no longer has a user attached. There are two kinds:

What happenedDisconnectReasonAD user kept?Your options
Mailbox disabled (Disable-Mailbox or EAC Disable)DisabledYesReconnect to the same user
Mailbox deleted (Remove-Mailbox or EAC Delete)DisabledNo, deleted tooConnect to another user without a mailbox, or restore into an existing mailbox
Mailbox moved to another databaseSoftDeletedYesRestore into an existing mailbox
  • Disconnected mailboxes stay in the database until the deleted mailbox retention period ends: 30 days by default, set per database with MailboxRetention. After that they're purged for good.
  • Remove-Mailbox with -Permanent or -StoreMailboxIdentity deletes the mailbox data immediately. Then only a backup helps.
  • Reconnecting (Connect-Mailbox) attaches the original mailbox to a user account. Restoring (New-MailboxRestoreRequest) copies its content into another mailbox through the Mailbox Replication Service.

Step-by-step#

Reconnect or restore: recovering a disconnected mailboxIs it still within the deleted mailbox retention period? if No: Recover from backup with a recovery database (The same applies after a permanent delete.); if Yes: What DisconnectReason does the mailbox show? if SoftDeleted: Restore into an existing mailbox (A copy left behind by a move to another database.); if Disabled: Does the original AD user still exist? if Yes: Reconnect it to the same user (The easiest recovery there is.); if No: Connect to another user, or restore (Connect to an account without a mailbox, or restore into an existing one.)Is it still within the deletedmailbox retention period?NOTERecover from backupwith a recoverydatabaseThe same applies after apermanent delete.NoWhat DisconnectReason doesthe mailbox show?FIXRestore into an existingmailboxA copy left behind by amove to another database.SoftDeletedDoes the original AD user stillexist?FIXReconnect it to thesame userThe easiest recovery thereis.YesFIXConnect to anotheruser, or restoreConnect to an accountwithout a mailbox, orrestore into an existing one.NoDisabledYesReconnect or restore: recovering a disconnected mailboxIs it still within the deleted mailbox retention period? if No: Recover from backup with a recovery database (The same applies after a permanent delete.); if Yes: What DisconnectReason does the mailbox show? if SoftDeleted: Restore into an existing mailbox (A copy left behind by a move to another database.); if Disabled: Does the original AD user still exist? if Yes: Reconnect it to the same user (The easiest recovery there is.); if No: Connect to another user, or restore (Connect to an account without a mailbox, or restore into an existing one.)Is it still within the deleted mailbox retentionperiod?NoNOTERecover from backup with a recoverydatabaseThe same applies after a permanent delete.YesWhat DisconnectReason does the mailboxshow?SoftDeletedFIXRestore into an existing mailboxA copy left behind by a move to anotherdatabase.DisabledDoes the original AD user still exist?YesFIXReconnect it to the same userThe easiest recovery there is.NoFIXConnect to another user, or restoreConnect to an account without a mailbox, orrestore into an existing one.
Figure 1 · Decision tree Reconnect or restore: recovering a disconnected mailbox. Find the mailbox and its DisconnectReason first, then answer from the top. Past the retention period, only a backup helps.

1. Check the retention window#

PowerShell
Get-MailboxDatabase | Format-Table Name, MailboxRetention -AutoSize

Compare it with the date the mailbox was removed. If time is short, start the recovery now and investigate later.

2. Find the disconnected mailbox#

PowerShell
Get-MailboxDatabase | ForEach-Object { Get-MailboxStatistics -Database $_.DistinguishedName } |
    Where-Object { $_.DisconnectReason -in "Disabled","SoftDeleted" } |
    Format-Table DisplayName, Database, DisconnectReason, DisconnectDate, MailboxGuid -AutoSize

Note the MailboxGuid and the database. If several entries share a display name (common with soft-deleted copies after moves), the GUID and date tell them apart.

If a mailbox you removed a few minutes ago isn't listed as disconnected yet, the store hasn't caught up with Active Directory. Find its MailboxGuid in the unfiltered Get-MailboxStatistics -Database DB01 output, then use Update-StoreMailboxState to sync the store's view of that mailbox with Active Directory:

PowerShell
Update-StoreMailboxState -Database DB01 -Identity 1a2b3c4d-0000-4f00-a000-123456789abc

3a. Reconnect it to a user account#

Use this when the original user still exists (the mailbox was only disabled) or when a new or existing account without a mailbox should take it over:

PowerShell
Connect-Mailbox -Identity "Lina Haddad" -Database DB01 -User "contoso\lhaddad"

The target account must not have a mailbox already. In the Exchange admin center, the same action is under Recipients › Mailboxes, in the more options menu (…), as Connect a mailbox. Linked and resource mailboxes have their own parameters on Connect-Mailbox; check the cmdlet reference before you connect one of those.

3b. Or restore its content into an existing mailbox#

Use this when the AD account is gone and someone else needs the data, or for a soft-deleted mailbox:

PowerShell
New-MailboxRestoreRequest -SourceStoreMailbox 1a2b3c4d-0000-4f00-a000-123456789abc -SourceDatabase DB01 `
    -TargetMailbox manager@contoso.com -TargetRootFolder "Lina Haddad mailbox" -AllowLegacyDNMismatch

Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics |
    Format-Table Name, StatusDetail, PercentComplete, ItemsTransferred -AutoSize

-AllowLegacyDNMismatch is needed because, by default, the restore checks that the source mailbox's LegacyExchangeDN is present on the target (as its LegacyExchangeDN or an X500 address), which it won't be when the target is a different mailbox. -TargetRootFolder puts everything under one folder instead of merging it into the target's own Inbox and Sent Items. When the request shows Completed, remove it:

PowerShell
Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest -Confirm:$false

4. Keep old replies and cached addresses working#

If the person's data now lives in a different mailbox, internal senders replying to old messages or using Outlook's cached entry can get IMCEAEX NDRs. Add the old LegacyExchangeDN as an X500 address on the mailbox that now receives their mail:

PowerShell
$old = Get-MailboxStatistics -Database DB01 | Where-Object { $_.MailboxGuid -eq "1a2b3c4d-0000-4f00-a000-123456789abc" }
Set-Mailbox manager@contoso.com -EmailAddresses @{Add = "X500:" + $old.LegacyDN}

Read the value before the mailbox is purged. My IMCEAEX and X500 guide explains the NDRs this prevents.

Verify#

  • After a reconnect, Get-Mailbox "Lina Haddad" returns the mailbox, and Get-MailboxStatistics "Lina Haddad" | Format-List ItemCount, TotalItemSize, LastLogonTime shows the old item count, not an empty mailbox.
  • Re-run the disconnected-mailbox search from step 2: the reconnected mailbox should no longer be listed.
  • After a restore, the target mailbox shows the folder named in -TargetRootFolder, and Get-MailboxRestoreRequestStatistics reported Completed with no skipped items worth investigating.
  • Send a test message to the old address and confirm it arrives in the right mailbox.

Tips & gotchas#

  • Disable leavers' mailboxes rather than deleting their accounts on day one; reconnecting to the same user is the easiest recovery there is.
  • A disconnected archive mailbox can only be reconnected to the user it belonged to, because it shares that user's LegacyExchangeDN.
  • Remove-StoreMailbox purges a disconnected mailbox permanently, so check twice before using it to reclaim space.
  • Past the retention period, or after a permanent delete, recover from backup with a recovery database: see Restoring mail with an Exchange Server recovery database.
  • For cloud mailboxes, the process is different: see Restoring deleted mail and mailboxes in Exchange Online.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)