How to Recover Deleted Exchange Mailbox?

While managing the mailboxes or performing maintenance tasks on Exchange Server, it might happen that you accidentally delete a mailbox. You may also delete mailbox to free some storage, when an employee leaves the company, or for any other reason. However, when you delete a mailbox, it is not immediately removed from the server. It remains on the server as a disconnected mailbox until the retention period (which is usually 30 days) is over. This means that you can recover the deleted mailbox, if required, within the retention period. Below, we will explain how to recover deleted mailbox from Exchange Server. But before proceeding, let’s understand the mailbox retention policy in Exchange Server.

What is the Mailbox Retention Policy in Exchange Server?

In Microsoft Exchange Server, retention policy is used for managing the lifecycle of mailboxes and mailbox items. This policy defines for how long the deleted mailboxes and emails will be retained before being permanently deleted or purged. By default, the deleted mailboxes are retained for 30 days and the deleted emails are retained for 14 days. However, you can modify the retention policy to increase the retention period. To change the retention policy for a specific mailbox, you need to first create a new retention policy tag. For this, you can use the command as given below:

New-RetentionPolicyTag -Name "DeleteAfter1Year” -Type All -RetentionEnabled $true -AgeLimitForRetention 365 -RetentionAction PermanentlyDelete

new retention policy tag

The above command will create a new retention policy tag - named DeleteAfter1Year.

Once the retention policy tag is created, you need to create a new retention policy using the new tag. For this, use the command as given below:

New-RetentionPolicy -Name "1YearPolicy" -RetentionPolicyTagLinks "DeleteAfter1Year"

1YearPolicy using the DeleteAfter1Year policy tag

The above command will create a new retention policy - named 1YearPolicy using the DeleteAfter1Year policy tag. Any mailbox that is assigned with this retention policy will be retained for a period of 1 year (365 days) after deletion, before being purged.

To assign the retention policy to a mailbox, you can use the command as given below:

Set-Mailbox -Identity "anubhuti" -RetentionPolicy "1YearPolicy"

assign the retention policy to a mailbox

The above command will assign the retention policy - 1YearPolicy - to the user anubhuti.

Now, let us look at the process to restore deleted/disconnected mailbox from the Exchange Server.

Prerequisites to Recover Deleted Exchange Mailbox

When you delete a mailbox, the associated Active Directory user account is also deleted. So, you need to connect the deleted mailbox to an Active Directory user or create a new user and then recover it. However, in case of a disabled mailbox, you only need to connect it to an Active Directory user. Before connecting, you need to first locate the disconnected or deleted

 $dbs = Get-MailboxDatabase

$dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisplayName -eq ""} | Format-List DisplayName,Database,DisconnectReason

For disabled mailboxes, the DisconnectReason field in the output will display the value as Disabled. Similarly, for deleted mailboxes, it will display the value as Deleted.

Note: If the output of the above command does not return anything, it means that the mailbox is purged and cannot be recovered.

Now, you need to connect the deleted mailbox to a user account in the Active Directory. You can use Exchange Admin Center (EAC) to connect the deleted mailbox. Here are the steps:

  • Open EAC and go to Recipients > Mailboxes.
  • Click the More Options > Connect a mailbox.

Connect a mailbox

  • You will see a list of disconnected mailboxes on the selected Exchange Server.
  • Select the deleted mailbox you want to connect to the user account and click Connect.
  • Click on the Yes, connect to the user account above option to connect the mailbox to the user if the user exists. Otherwise, choose No, I want to connect to a different user account to connect mailbox to a new AD user account.

connect mailbox to a new AD user account

  • If you click the Yes option, the mailbox will be restored to the existing mailbox.
  • If you click the No option, then you need to select the new AD user account from the list to connect the mailbox.

Alternatively, you can use the PowerShell command in Exchange Management Shell (EMS) to connect the deleted mailbox. You can use the Connect-Mailbox command as given below:

Connect-Mailbox -Identity "John" -Database MBXDB01 -User "Robin Wood" -Alias robinw

This command will connect the disconnected user mailbox to a non-mail-enabled user account.

Methods to Recover Deleted/Disconnected Exchange Mailboxes

Here are the methods that you can use to restore deleted mailboxes in the Exchange Server.

Note: The user account (that you will be using to restore the deleted mailbox) should be a part of the Organization Management role group.

Method 1: Use the New-MailboxRestoreRequest PowerShell Cmdlet

Note: This method can be used to restore deleted mailbox in the Exchange Server 2010, 2013, 2016 and 2019.

You can recover the deleted Exchange mailbox by using the New-MailboxRestoreRequest PowerShell cmdlet (see the below example).

New-MailboxRestoreRequest -SourceStoreMailbox e4890ee7-79a2-4f94-9569-91e61eac372b -SourceDatabase MBXDB01 -TargetMailbox "Debra Garcia" –AllowLegacyDNMismatch

The AllowLegacyDNMismatch parameter used in the command will recover the source mailbox to a different mailbox that does not have the same legacy DN value.

The above command will restore the deleted mailbox to the target mailbox - ‘Debra Garcia.’

To view the status of restore process, you can use the Get-MailboxRestoreRequest cmdlet.

Once the process is complete, the deleted mailbox will be recovered to the chosen source mailbox.

To verify if the mailbox has been restored successfully, you can run the following command:

Get-User “

If the command output displays the UserMailbox value for the RecipientType property, it indicates that the user account and the mailbox are connected.

Method 2: Use Windows Server Backup

If you create regular backups using Windows Server Backup (WSB), then you can restore the deleted Exchange mailboxes from the backup. Here are the steps to recover deleted Exchange Mailboxes using WSB:

  • Open the Windows Server Backup.
  • Click on Recover.

Pick Local backup option

  • Choose the location to store the backup and click Next.

Choose the location to store the backup

  • Choose the date of backup you want to use for recovery and click Next. (Make sure to choose a backup that was created before the mailbox was deleted.)

Choose the date of backup you want to use for recovery

  • Choose the location where you want to recover the backup and click Next. This will start the restoring process.

Choose the location where you want to recover the backup

Once the restore process is finished, you can use the recovered database as recovery database (RDB) and extract the deleted mailbox.

Alternative Solution to Recover Deleted Exchange Mailboxes

An easy and quick way to recover deleted Exchange mailboxes is by using an advanced Exchange recovery software, such as Stellar Repair for Exchange. This Exchange recovery software can easily recover deleted mailboxes (that are still in their retention period) from Exchange database (EDB) files. You need to just scan the EDB file (from where the mailboxes were deleted) by using the software and it will list all the mailboxes and other items, including the deleted mailboxes, on the screen. You can then select the deleted mailboxes and directly export them to a live Exchange Server database. The software can also save the users mailboxes, archives, public folders, and other Exchange database items in PST format. It can also export the EDB file items to Microsoft 365 account.

Conclusion

Above, we have explained the stepwise process to recover the deleted mailboxes from backup and using the Exchange native tools - Exchange Admin Center (EAC) and Exchange Management (EMS). However, restoring the deleted mailboxes via Exchange Admin Center (EAC) or Exchange Management (EMS) is quite tedious and time-consuming. As an alternative, you can use an Exchange recovery software, like Stellar Repair for Exchange. It can help you to restore deleted mailboxes (still in their retention period) in just a few simple steps. It also allows you to create a new user, map the recovered mailbox, and then directly export it to the newly created mailbox.



Was this article helpful?
FAQs
A. Once the retention period for a deleted mailbox has expired (after 30 days), the mailbox is permanently deleted and cannot be recovered using standard recovery methods. However, you can recover the mailbox from backup, if it is available.
A. You can restore a deleted shared mailbox on an on-premises Exchange Server by using the Exchange Admin Center (EAC). Alternatively, you can use the New-MailboxRestoreRequest cmdlet in the Exchange Management Shell.
A. If a mailbox has been purged, it can only be recovered from the backup.
A. You can find a disconnected mailbox in the Mailboxes section in the EAC. Alternatively, you can use the Get-Mailbox command in Exchange Management Shell (EMS) to get the information on all the mailboxes, including the disconnected ones.
About The Author
author image
Anubhuti Sinha linkdin Icon

Anubhuti is a tech enthusiast with deep expertise in Microsoft Exchange Server.

Table of Contents

WHY STELLAR® IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received