Empty deleted items for an 0365 Mailbox

hosted-exchangemicrosoft-office-365

Please advise of there is a way to empty the deleted items folder of an office365 mailbox. This is not an on-premise exchange, all hosted in microsoft.

I have tried this command:

Search-mailbox -identity <username> -TargetMailbox "inbox" -Targetfolder "Deleted Items" -DeleteContent -Verbose

It does not work. It executes but does not have any effect on the deleted items folder.

Thanks in advance.

Best Answer

You will have to change the default email retention for deleted items in Office 365. Not a long time ago, it was 30 days by default, but Microsoft decided to change it to something like "Keep Forever".

Create a custom retention policy

You can either edit the name of the Default MRM Policy or create a new policy to opt out of this change. To change the policy name in Office 365 navigate to Office 365 Admin > Exchange admin center > compliance management > retention policies. Next, select Default MRM Policy, click the edit icon and then change the name of the policy.

https://blogs.office.com/2015/02/20/extended-email-retention-deleted-items-office-365/