Working With Disconnected Mailbox Exchange 2013

A mailbox gets disconnected when it is no longer associated with an account in Active Directory (AD). By default, the time for retaining the disconnected mailbox is 30 days. After the time period is over the mailbox will purged from the system. During this retention period mailbox can be reconnected to a valid Active Directory account using the Connect-Mailbox cmdlet or Connect Mailbox Wizard from EAC. This allows you to clean up from accidental user deletion.

Disconnected Mailbox Exchange 2013

How to Identify a Disconnected Mailbox in Exchange Server

Since the disconnected mailbox is no longer associated with Active Directory account there is need to identify the disconnected mailbox alternatively. Thankfully we have three best ways to identify a disconnected mailbox:

  • Display name of the mailbox
  • Legacy Distinguished Name (LegacyDN)
  • Globally Unique Identifier (GUID)

Command to retrieve the disconnected mailbox in Exchange Server

Get-MailboxStatistics -Server CONTOSO-EX01 | where {$_.DisconnectDate -ne $null} | fl DisplayName, MailboxGUID, LegacyDN,DisconnectDate

Reconnecting the Mailbox

Once you have the mailbox identifier you can reconnect the mailbox to an account with the following command:

Connect-Mailbox MailboxID -Database DatabaseName -User UserToConnectTo-Alias MailboxAlias

Changing the Retention Period of Mailbox in Exchange Server

You can also change the number of days for keeping the mailboxes (by default it is 30 days). The setting will affect all the mailboxes in database. Here is the command to change the number of days up to 60 days.

Set-MailboxDatabase DB05 -MailboxRetention 60.00:00:00

Removing disconnected mailboxes in Exchange Server

Exchange retains disabled mailboxes in the mailbox database by default for 30 days (based on the deleted mailbox retention settings). After retention period is over, a disabled mailbox is purged from the Exchange mailbox database. You can also permanently delete a disabled mailbox and all its message content from the mailbox database by using the following command

Remove-StoreMailbox cmdlet

After executing the above command, the data loss is permanently and the mailbox can’t be recovered further.

Leave a comment