Purge deleted mailbox

Posted: January 24, 2012 in Exchange 2010, MBX, Powershell
Tags: , , , , , ,

In Exchange’s default the retention time for a deleted mailbox is set to 30 days. If you have to force purging a mailbox you have to set retention time to 0 days.

Set retention to 0 days:

Set-MailboxDatabase -Identity “MBX-DB001” -MailboxRetention 00.00:00:00

Cleanup Mailbox Database:

Clean-MailboxDatabase -identity “MBX-DB001

Set retention back to 30 days:

Set-MailboxDatabase -Identity “MBX-DB001” -MailboxRetention 30.00:00:00

Make sure to change the mailbox databases name to your environment.

Cheers,

Chris

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s