3

I need to recover an entire deleteditem aka dumpster folder.

Using Get-MailboxStatistics User@Domain.com | 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?

TryTryAgain
  • 1,152
  • 5
  • 22
  • 41

3 Answers3

3

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

Search-Mailbox -SearchDumpsterOnly "user@domain.com" -TargetMailbox tmprecoveryemailacct@domain.com -TargetFolder inbox
jscott
  • 24,484
  • 8
  • 79
  • 100
Budtske
  • 31
  • 1
2

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

Search-Mailbox "user@domain.com" -TargetMailbox tmprecoveryemailacct@domain.com -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.

TryTryAgain
  • 1,152
  • 5
  • 22
  • 41
  • 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 06:48
1

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

Shivam
  • 11
  • 1