Restore deleted mailbox Exchange 2013
Recently we had a customer accidentally delete a mailbox while in the ECP.
Going to Recipients -> mailboxes -> connect a mailbox showed no results
Using the following management shell commands were also fruitless
Get-MailboxStatistics | Where {$._DisconnectReason -eq "SoftDeleted" fl DisplayName,MailboxGUID,LegacyDN,Database
Get-MailboxStatistics | Where {$._DisconnectReason -eq "Disabled" fl DisplayName,MailboxGUID,LegacyDN,Database
I know I needed the GUID of this mysterious mailbox so I ran
Get-MailboxDatabase | Get-MailboxStatistics | Format-list DisplayName,MailboxGuid,Database,DisconnectReason,DisconnectDate > usermail.txt
In here I was able to locate the users mailbox in the text file
DisplayName : First Last
MailboxGuid : xxxxxxxxx-xxxx-xxxx-xxxxxxxxxxx
Database : DB02
DisconnectReason :
DisconnectDate :
I took note of the mailbox guid and ran
Update-storemailboxstate -database "DB02" -Identity "xxxxxxxxx-xxxx-xxxx-xxxxxxxxxxx"
After this the mailbox now appeared in the ECP under connect to mailbox.
I was then able to confirm that the mailbox was reconnected to the user.
I did have to recreate the users alias in the users properties.