1

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?

Skyhawk
  • 14,149
  • 3
  • 52
  • 95
makerofthings7
  • 8,821
  • 28
  • 115
  • 196

1 Answers1

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

Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95