Posted on June 6, 2014 · Posted in Exchange

Full Mailbox and Single Item Recovery in Exchange 2013

We go on with a series of articles on backup and recovery of the mailbox database of the Exchange 2013 server. In the previous articles we showed how to back up the Exchange 2013 mailbox database and how to recover it into a special database (recovery database). Today we will consider the recovery of a certain mailbox (totally and separate folders) or single items (separate letter or mail folder) from a backup.

So, in the previous article we stopped at the connection and mounting (take online) of the separate recovery mailbox database that was recovered from the backup of the Exchange 2013 mailbox database. You can look through the list of mailboxes in the recovered mailbox database using the  PowerShell cmdlet Get-MailboxStatistics:

Get-MailboxStatistics -Database RDB

Where RDB is the name of the recovery mailbox database

Get-MailboxStatistics - exchange 2013

If you are interested in a certain mailbox, you can filter the output of the previous command using the following phrase:

Get-MailboxStatistics -Database RDB | ?{$_.DisplayName -like 'Dudley*'}

To recover mailboxes in Exchange 2013, the cmdlet New-MailboxRestoreRequest is used.

To restore the contents of a certain mailbox into the source mailbox, use the following command:

New-MailboxRestoreRequest –SourceDatabase RDB –SourceStoreMailbox “Alex Dudley” –TargetMailbox adudley –AllowLegacyDNMismatch

In this example the mailbox with the DisplayName “Alex Dudley” is recovered into the mailbox with the name «adudley» of the existing database. By default, the cmdlet New-MailboxRestoreRequest looks for the concurrent LegacyExchangeDNs in the mailbox database or checks matching of the X500 addresses. This is done to prevent the administrator to accidentally restore data into the wrong location. If you really have to restore the data into a different mailbox, you have to use the AllowLegacyDNMisMatch key.

Tip. After creating a request to recover a mailbox, the request is queued and gets the Queued status). You can check the status of your request with the Get-MailboxRestoreRequest and Get-MailboxRestoreRequestStatistics cmdlets. The syntax of the command is as follows:

Get-MailboxRestoreRequestStatistics -Identity MailboxUser\RestoreRequestName

powershell cmdlet Get-MailboxRestoreRequest n exchcange 2013

The data from the recovered mailbox can be copied to a separate folder in the user mailbox. Supposing if you have to recover the contents of the mailbox into a separate folder «Restored Items», the command will look like this:

New-MailboxRestoreRequest –SourceDatabase RDB –SourceStoreMailbox “Alex Dudley” –TargetMailbox adudley –TargetRootFolder “Restored Items” –AllowLegacyDNMismatch

When the recovery is over, a new folder with the contents of the recovered mailbox appears in the user box.

"restore item" folder

It is possible to recover both the contents of the mailbox as a whole and certain folders. You can recover Inbox folder as follows:

New-MailboxRestoreRequest -SourceDatabase RDB -SourceStoreMailbox "Alex Dudley" -TargetMailbox adudley -IncludeFolders "#Inbox#"

The -IncludeFolders key accepts the list of folders. The names of folders should be tagged with # (hash). For example, #SentItems#, #Contacts#, #Tasks#.

You can also recover a certain letter/letters with the keywords contained in the subject or body of the letter. For example, you have to find and recover the the letter with the keywords “windows server 2012 r2” in the subject and “MAK key” in the body of the letter:

Restore-Mailbox -Identity IT-admin -RecoveryDatabase RDB -SubjectKeywords "windows server  2012 r2" -ContentKeywords "MAK key"

Any request to recover data from Exchange is not removed from the queue after it was successfully run. To remove all successful requests from the system, run the following command:

Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest

Related Articles