Thursday, February 26, 2015

How to work/deal with disconnected mailboxes in Exchange Server 2013

An Exchange mailbox is a composition of a Directory user account and mailbox data stored in the Exchange mailbox database. The Exchange attributes of Active Directory user object stores all configuration data for a mailbox. The database of mailbox contains the mail data that’s in the mailbox associated with the user account.

Following picture is a representation of mailbox components:

What is a disconnected mailbox?
A disconnected mailbox is a mailbox object in the mailbox database which is not associated with an Active Directory user account. These mailboxes are basically of two types:
         a)      Disabled mailboxes
         b)      Soft-deleted mailboxes

      a)     Disabled mailboxes: When a user mailbox is disabled or deleted in the EAC (Exchange Administration Center) or by executing Disable-Mailbox or Remove-Mailbox command in the Exchange Management shell, Exchange restore the deleted mailbox in the mailbox database and put the mailbox to a disabled state. These mailboxes referred as disabled mailboxes.

The difference between disable and deleted mailbox is that, in disable mailbox, the Exchange attributes are removed from the corresponding Active Directory user account while in deleted mailbox both the Exchange attribute and the Active Directory user account are deleted.

NOTE: If the user mailbox is deleted using a Remove-Mailbox command and either the Permanent or StoreMailboxidentity parameter, it will be deleted from the mailbox database immediately.

If you want to find any disabled mailbox in your organization, execute the following command in the shell:

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.DisconnectReason -eq "Disabled" } | ft DisplayName,Database,DisconnectDate

     b)   Soft-deleted mailboxes: When a user mailbox is moved to a different mailbox database, Exchange doesn’t fully delete the mailbox from source mailbox database. It keeps the mailbox in the source mailbox database to a soft-deleted state. These soft-deleted mailboxes can be retained in the source database either until the deleted mailbox retention period expires or the Remove-StoreMailbox command is executed.

If you wish to identify the soft-deleted mailboxes in your organization, execute:

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.DisconnectReason -eq "SoftDeleted" } | ft DisplayName,Database,DisconnectDate  

Now, the following is a list of activities which you can perform with disabled and soft-deleted mailboxes:

      1)    Working with disabled mailboxes: You can perform many operations on disabled mailboxes before it get permanently deleted from the mailbox database:
·         You can reconnect it to the same user account.
·         You can connect it to a different user account which doesn’t have a mailbox.
·         You can also restore it to a user account that has an existing mailbox.
·         Permanent deletion of mailbox can be done from Exchange mailbox database.

    2)  Working with disabled archive mailboxes: When Archive mailboxes are disabled they become disconnected. You can connect a disconnected archive mailbox by using Connect-Mailbox command with the Archive parameter. You can perform two operations on a disconnected archive mailbox as follows:

·         You can connect it to an existing primary mailbox.
·        You can also permanently delete it from the Exchange mailbox database.

      3)   Working with soft-deleted mailboxes: When a user mailbox is moved from one Exchange mailbox database to another mailbox database, then a ‘soft-deleted’ mailbox is created. However, this mailbox doesn’t get fully deleted from the source database. And in case the mailbox fails to move to a destination mailbox. You can restore it back from the source database depending upon the mailbox retention period.

Following operations can be executed in the soft-deleted mailbox:

·         Restore it to an existing mailbox.
·        These types of mailboxes can be permanently deleted from the Exchange mailbox database.

So, I believe this blog gives you the better insight about the relation between the various components of Exchange Server and what sort of activities you can perform with those components (mailboxes).

No comments:

Post a Comment