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.

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

1 Answer 1

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

 
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.