A Question Regarding Recovering Mailboxes from a Recovery Storage Group for Archiving Purposes.

I have been given the task of restoring emails for an entire organization of about 75 users from the past three years so that we can archive them and reference them when needed for FOIA requests and the like.

How I planned to achieve this was by restoring the entire Exchange database from each month's end backup to a recovery storage group, and then moving the relevant mailboxes from that storage group into a folder (one folder for each month) in a mailbox on the live server that was created specifically for this purpose.

So in other words, I would have a live mailbox called EmailArchive with folders for each month such as 12-14, 11-14 and so on.

Within those folders would be individual folders labeled after each user such as "Recovered Data - John Doe - the date and time it was recovered" such as Exchange labels each folder when it is recovered.

Now that in and of itself is not an issue as I can easily accomplish this through the Microsoft Exchange Troubleshooting Assistant in the Management Console.

However, the issue is that I need to recover only the emails for each user that are from that month.
And when I set the start and end dates under the advanced options of the Merge Options, it will always error out because for some reason, the command that should be "-startdate" and "-enddate" get switched to "-starttime" and "-endtime" when you look at the command that it puts out in the error details.

I could simply put in Restore-Mailbox "Email Archive" -RSGDatabase "Recovery Storage Group\Mailbox Database" -StartDate "12/01/14" -EndDate "01/01/15" -RSGMailbox "John Doe" -TargetFolder "12-14" in the command shell but I need to do this for each of the 75 users for 36 months worth of backups.

So my question is, is there a way to get around the issue where the wrong commands are being used when I do the recovery through the management console?

If not, is there a way I could put together a script or batch file that would take the above command and run it for each mailbox that needs to be restored in this way?

Keep in mind that I am not all that well versed in powershell scripting, though I am not overly intimidated by it.

I've been googling for a solution to this for days and have found pretty much nothing so any help in the matter is very much appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
I personally would recommend Kernel Data Recover for Exchange Server. This tool will allow you to simply point at an EDB file and recover and mailboxes/mail items/ that are with in it. Great product and very easy to use.


consultant49045Author Commented:
Thank you Will,

If all else fails, I will consider that as an alternative.
HariomExchange ExpertsCommented:
Please run the following command to recover all the mailboxes from RSG database
Get-MailboxStatistics -database 'RSG\Mailbox Database' | restore-mailbox -RSGDatabase 'RSG\Mailbox Database'

For Example :-
Get-MailboxStatistics -database 'RSG\Mailbox Database' | restore-mailbox -RSGDatabase 'RSG\Mailbox Database'' -TargetFolder '12-14' -StartDate '02/02/05' -EndDate '02/05/05'

Ref : https://technet.microsoft.com/en-in/library/aa997694(v=exchg.80).aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
consultant49045Author Commented:
Thank you.

This worked for what I needed to accomplish.
I will still need to delete the unwanted mailboxes but that is a minimal task compared to having to restore each mailbox individually.

Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.