Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to recover an entire deleteditem aka dumpster folder.

Using Get-MailboxStatistics | 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

You probably already have the answer, but for posterity, you may specify -SearchDumpsterOnly so it only returns deleted items:

Search-Mailbox -SearchDumpsterOnly "" -TargetMailbox -TargetFolder inbox
share|improve this answer
up vote 2 down vote accepted

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

Search-Mailbox "" -TargetMailbox -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

unfortunately search-mailbox cmdlet is no longer available. not sure why they removed it. There is no option to recover ONLY recoverable items..

share|improve this answer

Your Answer


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.