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?


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 :-)

  • Search-Mailbox does not support the modified property unfortunately – Klaus Mar 8 '18 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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