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

A specific recipient policy was mistakenly applied to all mailboxes in our company. I have changed the recipient policy to the correct one. I now need to restore (from delete items) all messages that that were affected by that recipient policy.

These users have many subfolders and I don't want to open outlook and use "recover deleted items" on each folder.

How can I recover deleted messages from all folders in a given mailbox? Can I constrain it by date deleted?

share|improve this question

Use the Search-Mailbox cmdlet to search for items deleted today, and copy them back.
NOTE: I haven't tested this yet, so please follow all three steps and make sure it acts as expected!

Perform a search on a Test Mailbox and review the output:

Get-Mailbox "Test Mailbox" | Search-Mailbox -SearchQuery 'modified:(today)' -SearchDumpsterOnly -EstimateResultOnly

Perform a search again on a Test Mailbox and verify that messages deleted today were moved back

Get-Mailbox "Test Mailbox" | Search-Mailbox -SearchQuery 'modified:(today)' -SearchDumpsterOnly

Perform the search on all mailboxes and emjoy!

Get-Mailbox | Search-Mailbox -SearchQuery 'modified:(today)' -SearchDumpsterOnly

I hope this helps :-)

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.