Applies to: Exchange Server 2013
Topic Last Modified: 2012-11-20
You can use retention policies to group one or more retention tags and apply them to mailboxes to enforce message retention settings. A mailbox can't have more than one retention policy.
Caution: |
---|
Messages are expired based on settings defined in the retention tags linked to the policy. These settings include actions such moving messages to the archive or permanently deleting them. Before applying a retention policy to one or more mailboxes, we recommended that you test the policy and inspect each retention tag associated with it. |
For additional management tasks related to messaging records management (MRM), see Messaging Records Management Procedures.
What do you need to know before you begin?
- Estimated time to complete: 5 minutes.
- You need to be assigned permissions before you can perform this
procedure or procedures. To see what permissions you need, see the
"Applying retention policies" entry in the Messaging Policy and
Compliance Permissions topic.
- For information about keyboard shortcuts that may apply to the
procedures in this topic, see Keyboard Shortcuts in
the Exchange Admin Center.
Tip: |
---|
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection |
What do you want to do?
Use the EAC to apply a retention policy to a single mailbox
- Navigate to Recipients > Mailboxes.
- In the list view, select the mailbox to which you want to apply
the retention policy, and then click Edit .
- In User Mailbox, click Mailbox features.
- In the Retention policy list, select the policy you want
to apply to the mailbox, and then click Save.
Use the EAC to apply a retention policy to multiple mailboxes
- Navigate to Recipients > Mailboxes.
- In the list view, use the Shift or Ctrl keys to select multiple
mailboxes.
- In the details pane, click More options.
- Under Retention Policy, click Update.
- In Bulk Assign Retention Policy, select the retention
policy you want to apply to the mailboxes, and then click
Save.
Use the Shell to apply a retention policy to a single mailbox
This example applies the retention policy RP-Finance to Bharat's mailbox.
Copy Code | |
---|---|
Set-Mailbox "Bharat" -RetentionPolicy "RP-Finance" |
For detailed syntax and parameter information, see Set-Mailbox.
Use the Shell to apply a retention policy to multiple mailboxes
This example applies the new retention policy New-Retention-Policy to all mailboxes that have the old policy Old-Retention-Policy.
Copy Code | |
---|---|
$OldPolicy={Get-RetentionPolicy "Old-Retention-Policy"}.distinguishedName Get-Mailbox -Filter {RetentionPolicy -eq $OldPolicy} -Resultsize Unlimited | Set-Mailbox -RetentionPolicy "New-Retention-Policy" |
This example applies the retention policy RetentionPolicy-Corp to all mailboxes in the Exchange organization.
Copy Code | |
---|---|
Get-Mailbox -ResultSize unlimited | Set-Mailbox -RetentionPolicy "RetentionPolicy-Corp" |
This example applies the retention policy RetentionPolicy-Finance to all mailboxes in the Finance organizational unit.
Copy Code | |
---|---|
Get-Mailbox -OrganizationalUnit "Finance" -ResultSize Unlimited | Set-Mailbox -RetentionPolicy "RetentionPolicy-Finance" |
For detailed syntax and parameter information, see Get-Mailbox and Set-Mailbox.
How do you know this worked?
To verify that you have applied the retention policy, run the Get-Mailbox cmdlet to retrieve the retention policy for the mailbox or mailboxes.
This example retrieves the retention policy for Bharat’s mailbox.
Copy Code | |
---|---|
Get-Mailbox Bharat | Select RetentionPolicy |
This command retrieves all mailboxes that have the retention policy RP-Finance applied.
Copy Code | |
---|---|
Get-Mailbox -Filter {RetentionPolicy -eq $policy} -ResultSize unlimited | Format-Table Name,RetentionPolicy -Auto |