Exchange mailboxes form the backbone of a business when it comes to ensuring smooth communication and collaboration within and outside the organization. At times, you may feel the need to delete these mailboxes to comply with regulations, remove data of off-boarded employees, or abide by data retention policies. In order to delete the intended mailboxes, some unwanted deletion may also take place that you would like to recover. This blog discusses various Exchange recovery methods to recover such deleted Exchange mailboxes.
What is the need to delete Exchange Mailboxes?
Numerous reasons can prompt you to delete Mailboxes from the Exchange Server
- Expense optimization: Set the paid Exchange license free for new online users
- Offboarding: Delete the data of the departed employees to store them to PST or some other external source
- Data purging: Removing old or unwanted data after the completion of the retention period
- Compliance: Abide by legal issues or matters related to data privacy
- Cleanup after migration: Delete old mailboxes and their content when moving to a different system
Hard-deleted vs. Soft-deleted mailboxes
The method to recover a deleted Exchange mailbox depends largely on how you deleted it. Usually, two ways of deletion exist:
Soft-deleted mailboxes
Soft deletion happens when you remove an Exchange mailbox using the Microsoft 365 admin center, or through the PowerShell cmdlet Remove-Mailbox. In this case, the mailbox remains in the recycle bin for a retention period of 30 days.
Hard-deleted mailboxes
When you permanently purge a Microsoft Entra user from the Exchange database, making it impossible to recover through standard tools in the Exchange Server, it refers to hard-deletion. It happens mostly when you permanently delete a user account or the retention period of the mailbox expires. Practices like the removal of Exchange Online license or forced deletion of mailboxes also indicate hard-deletion.
How to restore a user mailbox in Exchange Server?
After you delete a mailbox, it remains in the Exchange Server until it completes the retention period of 30 days. If you want to restore it, you will have to do it within this duration. Here are different methods to recover deleted Exchange mailboxes.
Restore a deleted mailbox using Exchange Online PowerShell
You can use the Undo-SoftDeletedMailbox PowerShell cmdlet to recover soft-deleted mailboxes.
Here is the command:
Undo-SoftDeletedMailbox allieb@contoso.com -WindowsLiveID allieb@contoso.com -Password (Read-Host “Enter password” -AsSecureString)
Restore a deleted mailbox after license removal
After the completion of the 30-day retention period, you cannot recover the mailbox. However, if you renew the license during this grace period, it will restore access to your mailbox and make it fully active.
Restore a deleted mailbox in a hybrid deployment
At times, you may perform soft-deletion of a user mailbox along with the hard-deletion of the Microsoft Entra user associated with the mailbox by using the Microsoft Entra ID. This is a hybrid deployment, and to recover the mailbox from this scenario, you can use New-MailboxRestoreRequest
- In the Exchange Management Shell environment, run the following PowerShell cmdlet:
Get-Mailbox -SoftDeletedMailbox | Select-Object Name,ExchangeGuid
This command will recognize the soft-deleted mailbox that you wish to restore.
- For the restored mailbox, create a target mailbox and run the command below to know its GUID
Get-Mailbox -Identity <NameOrAliasOfNewTargetMailbox> | Format-List ExchangeGuid
- Use the GUID value obtained from step 1 to replace<SoftDeletedMailboxGUID> and use the GUID value obtained from step 2 to replace <NewTargetMailboxGUID>
Run a new PowerShell cmdlet to recover a deleted Exchange mailbox that replaces:
- <SoftDeletedMailboxGUID> with the GUID value from Step 2, and
- <NewTargetMailboxGUID> with the GUID value from Step 3, and run the following cmdlet to restore the mailbox. Here is the command:
New-MailboxRestoreRequest -SourceMailbox <SoftDeletedMailboxGUID> -TargetMailbox <NewTargetMailboxGUID>
Restore a deleted on-premises mailbox
You can use Exchange Management Shell (EMS) to restore a deleted or disconnected on-premises mailbox to an online mailbox in Exchange Server. Here are the necessary Exchange recovery steps:
- Run the below PowerShell command
Get-MailboxDatabase | Get-MailboxStatistics | where {$_.DisconnectReason -eq “Disabled”} | Format-Table DisplayName,MailboxGuid,LegacyDN,Database
It will fetch the MailboxGuid value of the disconnected mailbox
- Next, determine the required GUID value of the mailbox database that contains the disconnected mailbox. Here is the command;
Get-MailboxDatabase | Format-List Identity,GUID
- Connect to Exchange Online PowerShell using the Connect-ExchangeOnline cmdlet.
Connect-ExchangeOnline [-UserPrincipalName <UPN>]
Here <UPN> refers to your mailbox account in user principal name format (for example, roger@federer.onmicrosoft.com).
- Run the below command to restore the Exchange Online mailbox:
Get-Mailbox -Identity “<MailboxIdentity>” | Format-List Name,ExchangeGuid,LegacyExchangeDN
This command will fetch the required ExchangeGuid value. Replace <MailboxIdentity>with the name or email address of the target Exchange Online mailbox.
- Next, run the following command to restore the deleted mailbox to the Exchange Online archive mailbox
Get-Mailbox -Identity “<MailboxIdentity>” -TargetIsArchive | Format-List Name,LegacyExchangeDn,ExchangeGuid,ArchiveGuid
- Finally, after getting all the requisite details, run the command below to initiate the mailbox restore request:
New-MailboxRestoreRequest -RemoteRestoreType DisconnectedMailbox -RemoteHostName <ServerFQDN> -RemoteCredential (Get-Credential) -RemoteDatabaseGuid <GUID> -SourceStoreMailbox <MailboxGUID> -TargetMailbox <ExchangeGUID>
- Once done, check the status of the restore request by using the Get-MailboxRestoreRequest cmdlet. Here is the command:
Get-MailboxRestoreRequestStatistics -Identity <MailboxRestoreRequestIdentity> -IncludeReport
These Exchange recovery steps will help to restore the disconnected on-premises mailbox to an Exchange Online mailbox.
Restore a deleted mailbox using the Exchange recovery tool
All the aforementioned methods are effective in recovering deleted Exchange mailboxes, but they need you to possess penetrating technical knowledge. Moreover, they do not guarantee complete mailbox recovery, as several issues may arise during the process. To overcome these hassles, admins prefer using automated third-party tools to recover a deleted Exchange mailbox. Here are some of the common features of these advanced applications.
- Repair and restore mailboxes in the Exchange database
- Restores deleted Exchange mailboxes and the contained items
- Recovers the Exchange database affected by server crashes, power outages, virus attacks, etc.
- Recovers the Exchange Server from Jet Engine error at the file, application, or database level
- Fix inconsistent Exchange databases, and export recovered mailboxes to PST, Office 365, or Live Exchange
These and many more features give the Exchange recovery tools an upper hand over the traditional manual recovery methods. When searching for a feasible tool that fulfills all these features, Stellar Repair for Exchange is a worthwhile option.
Conclusion
You may feel the need to delete mailboxes from Exchange Server for assorted reasons. For example, it could be to free storage space for new data, remove the details of offboarded employees, carry out cleaning tasks, and so on. However, when deleting the intended user mailboxes, you may also remove some crucial mailboxes accidentally.
To recover such important mailboxes, there can be multiple Exchange recovery methods depending on whether you have soft-deleted or hard-deleted them. Prominent among these ways include recovering a deleted Exchange mailbox through PowerShell cmdlets and license renewal during the retention period. Besides, the options of restoring a deleted on-premises mailbox or a deleted mailbox in a hybrid deployment are equally useful.
Nevertheless, these manual methods come with their respective limitations of technical acumen and excessive time consumption. They do not guarantee a satisfying resolution of the issue either. Therefore, admins prefer using advanced Exchange recovery tools, such as Stellar Repair for Exchange, to recover a deleted Exchange mailbox.



