Restoring on-premises users and mailboxes
When you disable or delete a mailbox, on-premises Exchange retains
the deleted mailbox in the mailbox database and puts the mailbox in a
disabled state. There is, however, an important distinction between
disabling and deleting a mailbox, and this difference affects recovery.
When you disable a mailbox, the Exchange attributes are removed from
the user account and the mailbox is marked for removal, but the user
account is retained. When you delete a mailbox, the Exchange attributes
are removed from the user account, the mailbox is marked for removal,
and the user account itself is either marked for deletion or deleted
entirely. Additionally, with either, if the mailbox has an in-place
archive, the in-place archive will also be marked for removal. However,
if the mailbox has a remote archive, the remote archive is removed
permanently.
Disabled and deleted mailboxes are referred to as disconnected
mailboxes. Disconnected mailboxes are retained in a mailbox database
until the deleted mailbox retention period expires, which is 30 days by
default. Deleted users may be retained as well.
In Exchange Admin Center, you can find disconnected mailboxes and reconnect them by completing these steps:
-
Select Recipients in the feature pane and then select Mailboxes.
-
Tap or click the More button (this button shows three dots) and then
select Connect A Mailbox. The Connect A Mailbox dialog box shows all
mailboxes marked for deletion but currently retained regardless of
whether those mailboxes were disabled, deleted, or soft deleted.
Important
When you move mailboxes between databases, mailboxes in the original
(source) database are soft deleted. This means they are disconnected,
marked as soft deleted, but retained in the original database until the
deleted mailbox retention period expires. In Exchange Management Shell,
you can use a DisconnectReason of “SoftDeleted” to find soft-deleted
mailboxes.
-
In the Connect A Mailbox dialog box, shown in Figure 4, use the selection list provided to select the server where you want to look for disconnected mailboxes.
-
Tap or click the mailbox to restore it and then tap or click Connect.
-
Connect the mailbox to the user account to which it was connected
previously or to a different user account. If the original user account
is available, select the Yes option to reconnect the mailbox to the
original user account. If the original user isn’t available or you want
to associate the mailbox with a different user, select the No option
and follow the prompts.
You can find all disabled mailboxes in an on-premises Exchange organization by entering the following command:
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason
-eq "Disabled" } | ft DisplayName,Database,DisconnectDate,DisconnectReason
Or you can find disabled mailboxes in a particular database using the following command:
Get-MailboxStatistics -Database DatabaseName | Where { $_.DisconnectReason
-eq "Disabled" } | ft DisplayName,Database,DisconnectDate,DisconnectReason
If you find that you need a mail-enabled or mailbox user account
that was deleted, you may be able to restore the deleted account. For
on-premises Exchange, you can restore user accounts from Active
Directory. When Active Directory Recycle Bin is enabled, you can
recover deleted objects using Active Directory Administrative Center
(as long as the deleted object and recycled object lifetimes have not
expired).
In Active Directory Administrative Center, select the Deleted Object
container to see the available deleted objects. When you select a
deleted user by tapping or clicking it, you can use the Restore option
to restore the user to its original container. For example, if the user
account was deleted from the Users container, the user account is
restored to this container. Once the user account is restored, you can
restore the Exchange settings and data. You can use Connect-Mailbox to
connect the user account to its disconnected mailbox.
When you connect a disconnected mailbox using Connect-Mailbox, you
associate the mailbox with a user account that isn’t mail-enabled,
which means the user account cannot have an existing mailbox associated
with it. Connect-Mailbox has a slightly different syntax for standard
mailboxes, shared mailboxes, and linked mailboxes. For standard mailbox
users, the basic syntax for Connect-Mailbox is:
Connect-Mailbox -Identity ExchangeId -Database DatabaseName -User ADUserId
-Alias ExchangeAlias
where ExchangeID identifies the disconnected mailbox in the Exchange
organization, DatabaseName is the name of the database where the
disconnected mailbox resides, ADUserID identifies the Active Directory
user account to reconnect the mailbox to, and ExchangeAlias sets the
desired Exchange Alias. Consider the following example:
Connect-Mailbox -Identity "Thomas Axen" -Database "Sales Database"
-User "Thomas Axen" -Alias ThomasA
This example reconnects the Exchange mailbox for Thomas Axen with
the related user account in Active Directory and sets the Exchange
alias as ThomasA. The alias is combined with the user logon domain to
set the User Principal Name (referred to in the UI as the User Logon
Name). The User Principal Name must be unique within the organization.
If another user account has the same User Principal Name, you’ll see a
warning about a user name conflict. You will need to resolve this
conflict before you can connect the mailbox.
When you disable or remove an archive mailbox from a mailbox, the
archive mailbox is disconnected from the source mailbox, marked for
deletion, and retained according to the retention settings. To connect
a disabled archive mailbox to the original source mailbox, you use the
Connect-Mailbox cmdlet with the -Archive parameter.
Although Connect-Mailbox has restrictions, you can connect a
disconnected mailbox to a user account that already has a mailbox. When
you restore the mailbox, its contents are copied into the target user’s
existing mailbox while the deleted mailbox itself is retained in the
mailbox database until the retention period expires (or it is purged by
an administrator).
You use New-MailboxRestoreRequest to restore mailboxes to accounts with existing mailboxes. The basic syntax is:
New-MailboxRestoreRequest -SourceMailbox MailboxID -SourceDatabase
DatabaseName -TargetMailbox ExchangeID
where MailboxID is the display name or GUID of the disconnected
mailbox to restore, DatabaseName is the name of the database where the
disconnected mailbox resides, and ExchangeID is an Exchange alias or
name for the account where the mailbox should be added. Consider the
following example:
New-MailboxRestoreRequest -SourceMailbox "Karen Berg" -SourceDatabase
"Marketing Database" -TargetMailbox "Dag Rovik"
You can restore archive mailboxes to users with existing accounts as
well. Use the -TargetIsArchive parameter as shown in this example:
New-MailboxRestoreRequest -SourceMailbox "In-Place Archive - Karen Berg"
-SourceDatabase "Marketing Database" -TargetMailbox "Dag Rovik"
-TargetIsArchive