How to make entire mailbox size to zero

Brass Contributor

Please use the below-mentioned command to make the entire mailbox size as zero. This will be helpful if any of your company's users are moving from one department to another department with a single email ID. 

 

Note: Please make sure of taking PST data backup before proceeding with this. Also, make some tests before running this command because there will be no rolling back. 

 

The Command: 

 

Search-Mailbox "user e-mail id" -SearchQuery size>0 -SearchDumpster -DeleteContent

 

After running the above-mentioned command, the mailbox data will become zero and the same will be displayed under Exchange Online. 

 

But the data will be saved to the "Purges" folder... to confirm the same, use the below-mentioned command. PFB screenshot for reference. 

 

Get-MailboxFolderStatistics -Identity "user" | select name,foldersize

 

venkatkirankona_0-1670840612089.png

 

To clear this "Purges" and "Versions" folder, use the below-mentioned command. 

 

Search-Mailbox "user e-mail id" -SearchQuery size>0 -SearchDumpsterOnly -DeleteContent

 

This process helped me a lot. If you have any doubts/concerns/suggestions about this post, please reply below. 

 

Best Regards,

Venkat Kiran Kona. 

 

0 Replies