Looks like its time for another post for in this blog.
Lately I have been working on the restores of mailbox for one VIP user for my client. I have been requested to restore his Calendar from 2 mailbox database restores. Since this user was indeed very important the task was to restore his Calendar into alternate mailbox.
I won't go into details of creating a recovery database as everything is already said in this Technet article
Using Restore-Mailbox command wasn't very helpful since they couldn't find some of the items in the restored Calendar folder and therefore requested me to restore dumpster and Deleted Items as well.
Here when the New-MailboxRestoreRequest command comes into play. Please note that it restores mailbox dumpster (Recoverable Items folder). According to Microsoft folks this command is helpful for all kinds of mailbox restores. Again, you can read this magic article about it and all its keys and parameters.
Please note couple parameters there. First one is TargetRootFolder. You can one of the default root folders or create your own folders beforehand. In my case I created custom folder under root before running restore. It's completely up to you whether you want to use New-MailboxFolder command or simply create it using Outlook.
Secondly, there's another parameter AllowLegacyDN. It allows you to restore data from mailbox to alternate mailbox without ExchangeLegacyDN errors (this parameter is unique for every mailbox).
If you know that mailbox can contain bad items (as it was in my case after I lost 4 hours simply to see that mailbox restore has failed) you can use BadItemLimit and AcceptLargeDataLoss depending on the number of items you can lose.
And finally in order to distinguish one restore from another I have used Name parameter and gave each restore its name in order to be able to track restores one by one.
Below I will give you examples of 2 commands that I used and based on the Technet article above you can tailor yours based on your needs.
Restore whole mailbox to alternate mailbox (with bad items):
New-MailboxRestoreRequest -SourceDatabase Recovery-DB01 -SourceStoreMailbox "John Smith" -TargetMailbox "Mary Smith" -TargetRootFolder CustomRootFolderName -AllowLegacyDN Mismatch -Name "Whole Mailbox Restore" -BadItemLimit 150 -AcceptLargeDataLoss
Restore particular folder to alternate mailbox:
New-MailboxRestoreRequest -SourceDatabase Recovery-DB01 -SourceStoreMailbox "John Smith" -TargetMailbox "Mary Smith" -TargetRootFolder CustomRootFolderName -IncludeFolders "Deleted Items" -AllowLegacyDN Mismatch -Name "Restore Deleted Items Aug 2013"
Finally I used New-MailboxExportRequest command in order to import restored data into PST file and handed it to the happy client.