12 gen 2011

Exchange Server 2010 SP1: How to delete Items for all mailboxes in all databases after xx days

If we are planning to automatically empty the Delete Items folder for all mailboxes, we need to create a Retention Policy tags for Deleted Items.

Here is the steps detailed how to set a policy to empty "Deleted Items":

1. Create a RetentionPolicy Tag

New-RetentionPolicytag -type deleteditems -name <Tag Name> -AgeLimitForRetention 7

2. Create a Retention Policy to be associated with RetenionPolicy Tag.

New-RetentionPolicy -Name <Policy Name> -RetentionPolicyTagLinks "<Tag Name>" (please note that the Tag Name is the same as step 1)

3. Apply the policy to all mailbox.

Get-mailbox | Set-Mailbox -RetentionPolicy "<Policy Name>"

As the command (Get-mailbox | Set-Mailbox -RetentionPolicy "<Policy Name>) I provided, it will be applied all mailbox which have been created after running. However, when we create a new mailbox on the Exchange server, the retention policy can be enabled and chosen in the User Type Wizard in Exchange Management Console.

The policy created by between Exchange Management Console and Exchange Management Shell is same. You can use either of way to create the policy according to your favorite.

In generally, there are three types of retention tags: Default Policy Tag (DPT), Retention Policy Tags (RPT), and personal Tags(PT). When you use PT type, you need to choose to use the policy manually. In this case, the Retention Policy Tags (RPT) type is created for default folder such as Delete Items and Inbox, etc and its policy will applied all mailbox (Exclude newly Created mailbox ), so you don't need to add the policy for every mailbox on the Outlook client.

Please refer to the following links to see more information:

Understanding Retention Tags and Retention Policies







Nessun commento:

Posta un commento