Managing Disconnected Mailboxes in Exchange Server

When an Exchange mailbox or an Active Directory user account is deleted, a mailbox is not immediately deleted and is stored in the mailbox database for some time (30 days by default). Administrator can recover data from this mailbox or reassign it to another user. In this article, we’ll talk about the types of deleted mailboxes and the ways of management and restore of these mailboxes in Exchange 2010-2016.

What Happens to the Exchange Mailbox After It Is Deleted

An Exchange mailbox consists of two parts: an Active Directory user account (all configuration data of a mailbox are stored in its attributes) and the mailbox itself in the Exchange mailbox database. A deleted Exchange mailbox (it may be right to say ‘disabled’) is a mailbox stored in a database, but not connected to any of the AD accounts. There are two types of deleted Exchange mailboxes:

Disabled – these are mailboxes disabled using Disable-Mailbox or Remove-Mailbox cmdlets (the first one disables a mailbox from an account, and the second one deletes the AD account as well)

Soft Deleted – the copies of the mailboxes saved in a storage after the mailbox is moved to another mailbox database. Thus, the data get additional protection from the issues that can occur during or after the mailbox is transferred to another database.

Both types of the deleted mailboxes are stored in the Exchange database before the expiration date specified by the administrator. The time, after which a mailbox is deleted, is specified in the settings of each Exchange database in Limits -> Keep deleted mailboxes for days (screenshots below for Exchange 2013 and Exchange 2010).

To display the list of all available deleted mailboxes in all Exchange databases, run this command:

How to Clear Exchange Databases from the Deleted Mailboxes

During the specified time, Exchange automatically clears the deleted mailboxes from the database. But the disabled mailboxes still take some space in a database, so during mass user migrations/removals, it may be necessary to force remove these mailboxes, thus freeing some space in the mail databases.

To permanently delete a disabled mailbox from the database, use Remove-StoreMailbox cmdlet having specified the MailboxGUID of the deleted mailbox.

Connecting a Deleted Mailbox to a User

A deleted mailbox may be connected to the same or another Active Directory account (obviously, the account must not have a mailbox). To connect a mailbox to the same account, run this command:

Connect-Mailbox -Identity "JSmith" -Database Lon-DB1 -User JSmith

You can perform the same operation from the EAC interface: Exchange Admin Center -> Recipients -> Connect a Mailbox.

Tip. Don’t forget to check and correct SMTP aliases if necessary. Before you start using the mailbox, wait till Active Directory replication is over.

How to Restore a Deleted Mailbox to a Mailbox of Another User

The data from a deleted mailbox can be restored to an existing mailbox of another user using the New-MailboxRestoreRequest cmdlet (we showed how to use this cmdlet in the article about the recovery of Exchange mailboxes):