Recovering deleted mailbox using PowerShell

September 29, 2017 | by iaur | posted as Administration, Exchange Online

Scenario

  • You have a former member(usera) and would like to restore the mailbox to a different active user (admin)
  • Usera has not been unlicensed for more than 30 days, otherwise its mailbox has been permanently deleted

usera = deleted mailbox alias

admin = active user alias

Steps

  1. Connect to EXO using PowerShell
  2. Run the following cmldets one at a time
Get-Mailbox -SoftDeletedMailbox usera | fl
This is to check if the usera mailbox still exist or within EXO’s retention
Get-Mailbox admin | Format-List ExchangeGUID
Take note of the value
Get-Mailbox -SoftDeletedMailbox usera | Format-List ExchangeGUID
Take note of the value
New-MailboxRestoreRequest -SourceMailbox “usera ExchangeGUID” -TargetMailbox “admin ExchangeGUID” -AllowLegacyDNMismatch -Verbose
note:
– ” is not included
– this imply data loss scenario as it will replace the Exchange GUID of the target user

Reference

https://social.technet.microsoft.com/wiki/contents/articles/32984.recover-soft-deleted-mailbox-in-exchange-online.aspx