O365 Deleting Items

We have a user who would like to delete or purge all his emails in the ‘Recover deleted items’ He can do this one at a time but he would like to select all. Can he do that or is there a power shell command we can run to do this for him?

Who is Participating?
Vasil Michev (MVP)Commented:
Newer versions of Outlook offer the functionality to purge/recover all messages from the "Recover deleted items" container. If you are using an older one, then it will be indeed more painful experience.

But yes, you can do it via PowerShell, however you have to use some EWS-based script as the "regular" PowerShell cmdlets cannot target specific folders. Instead, you need to use EWS with either Full Access permissions or impersonation, bind to the folder (recoverableitemsdeletions) and Empty it. this article should get you started: https://msdn.microsoft.com/en-us/library/office/dn424760(v=exchg.150).aspx
IvanSystem EngineerCommented:

you can connect to Exchange Online via PS> https://technet.microsoft.com/library/jj984289.aspx
Then use following command to delete all Recoverable items from users mailbox:
Search-Mailbox <username> -SearchQuery size>0 -SearchDumpsterOnly -DeleteContent

More info can be found on: https://support.office.com/en-gb/article/Delete-items-in-the-Recoverable-Items-folder-of-cloud-based-mailboxes-on-hold-Admin-Help-a85e1c87-a48e-4715-bfa9-d5275cde67b0

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.