Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to recover an entire deleteditem aka dumpster folder.

Using Get-MailboxStatistics User@Domain.com | Select *Deleted* I am able to see 2.2+GB of data = 9,700+ emails.

How can I recover all of these?

I have seen Search-Mailbox "Discovery Search Mailbox" -SearchQuery <search query> -TargetMailbox <user> -TargetFolder inbox which I assume would work, but only for single searches and items. I need a batch solution. Any Office 365 PowerShell gurus?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I was able to piece together a solution. The following command recovered all contents:

Search-Mailbox "user@domain.com" -TargetMailbox tmprecoveryemailacct@domain.com -TargetFolder inbox

I needed to use Search-Mailbox without -SearchQuery. Apparently no wildcard options worked, but omitting it worked as a wildcard. Also, another caveat, you need to recover to a separate mailbox (much like HDD recovery, why I don't know). Hope this helps someone in the future.

share|improve this answer
    
After running this (took about 4 hours) I realize this is not fine tuned enough. Expect an edit to this solution. As I stated in the question the Get-MailboxStatistics command resulted in 2.2GB of data in 9,700 emails...This solution resulted in the recovery of too much: ~7.9GB of data in ~35,000 emails. I need to somehow figure out how to pipe it through a findstr or something similar. Still open for any/all suggestions. –  TryTryAgain Sep 15 '12 at 6:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.