Email Repair

How to Recover Deleted Exchange Mailbox?

  • Written By Ravi Singh

  • Updated on April 26, 2021

  • Min Reading 5 Min

Summary: This article outlines the detailed process to recover deleted Exchange mailbox. It discusses the stepwise instructions to restore the mailbox by using Exchange Admin Center (EAC) and Exchange Management Shell (EMS). Also, it mentions about an Exchange recovery software that can recover mailboxes from corrupt or dismounted database.


When a mailbox in Exchange Server is deleted, it is not physically deleted from the mailbox database. The mailbox is marked as disconnected and remains there for a period of 30 days. After 30 days, the mailbox will be permanently deleted. The Exchange Server keeps the deleted mailbox for a period of 30 days so that if you change your mind, you can restore the mailbox.

How to Delete a Mailbox?

To delete a mailbox from the Exchange Admin Center (EAC), log in to the interface and click on recipients and mailboxes.

eac

Then, highlight the mailbox to delete and click on the delete button.

mailbox

As you will see, the mailbox has been removed from the list. Although it has been removed and deleted, the mailbox will remain there for 30 days.

How to Recover Deleted Exchange Mailbox?

To reconnect a mailbox before the 30-day retention period, click on recipients and mailboxes. Then, click on the more options button and click on connect a mailbox.

connect-mailbox

Here you will have a list of all the mailboxes which have been disabled or soft-deleted.

disconnect mailbox

If you have more than one server, you can select the server from the Select Server option and choose the mailbox to restore. After highlighting the mailbox, click on the connect button to restore mailbox.

connect button

When you delete a mailbox, the Active Directory user is also deleted. In such a case, if you have the Recycle Bin enabled on the Active Directory, you can recover the old user which was associated with the mailbox.

If not, you need to create a new Active Directory user and connect the mailbox to that user.

To enable the Recycle Bin for the Active Directory, follow these steps:

  • Open the Server Manager and then click on Tools and Active Directory Administrative Center.
Active Directory Administrative Center
  • Click on the server (local).
ad local
  • Under the Tasks pane, click on Enable Recycle Bin.
Enable Recycle Bin

You can also enable the feature via PowerShell by using the below given command:

Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target ex2019.lan

Enable ADOptional Feature

This feature will come in handy during re-connecting of mailboxes and when a user has been deleted by mistake in your Active Directory.

Now, back to the restore of the mailbox after deletion. If you get the message that the matching user has not been found, you can connect it to a new user. After creating a new user for the mailbox, click on the “No, I want to connect to a different user account.” If you have Recycle Bin enabled on your Active Directory, click on Cancel, restore the user from Active Directory, and retry the wizard.

In case you’re connecting the mailbox to a different user, you will be asked to choose to connect to a user mailbox, room mailbox, equipment mailbox, shared mailbox, or linked mailbox. Follow these steps:

Note: In this example, we will be restoring to a User mailbox.

restoring to user mailbox
  • Click User mailbox and click Next.
  • Click on the Browse button and find the user to connect the mailbox to and click Finish.
connect useraccount
  • Once this is ready, you will need to click the refresh button on the mailboxes screen.
refresh mailboxes

You will see that the temp user is visible and ready to use.

You can also do the same via PowerShell by using the command - Connect-Mailbox, as given below.

Connect-Mailbox "Disconnected Mailbox" -Database "Database Source" -User "NewUser"

Connect Mailbox

Before doing so, you need to know the exact name to restore mailbox and the source of the database where the mailbox was associated. This can be done by using the Get-MailboxDatabase PowerShell command (see the below example).

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

Get MailboxDatabase

This will connect and restore deleted mailbox to the user.

You can restore a deleted mailbox from Exchange when all is working fine. What happens if the database is not mounted due to corruption or hardware/software issues? What happens when a database in your Exchange Server setup is corrupted?

In such cases, you cannot open the database as it can only be opened with the same Exchange Server installation in which it was created. You need to recover the mailbox database to a healthy state. For this, you can use EseUtil to run a recovery process and try to put the database back into the healthy state. However, sometimes, this is not successful and you might end up with a considerate amount of data loss, if the hard recovery is used. Also, this would take a lot of administrative effort and resources. For databases, which are still active or on a separate backup, you can restore the database from backup, create a recovery database, and use the Restore-Mailbox PowerShell cmdlet to restore from the database to a target folder under the mailbox (as given below).

Restore-Mailbox -Identity "User1" -RecoveryDatabase RDB -RecoveryMailbox "User1" -TargetFolder Restored

In newer versions of Exchange, the New-MailboxRestoreRequest PowerShell cmdlet is used.

New-MailboxRestoreRequest -SourceDatabase "MAINDB" -SourceStoreMailbox "RDB" -TargetMailbox User1

New-MailboxRestoreRequest

An Alternative Solution

To reduce recovery time and administrative efforts, you can use an Exchange mailbox recovery tool, such as Stellar Repair for Exchange. This tool can open and browse any version of Exchange Server database - from 2007 to 2019, without the Exchange Server installed. By using the application, you can open the EDB file and export the data to PST and other file formats. You can also use the application to restore mailbox or an EDB directly to a live Exchange Server database or Office 365 tenant.

76% of people found this article helpful