Friday, September 13, 2013

Quick Ways To Assign Retention Policies in Exchange 2010

In life there are things that we would rather not retain... like this


I've had several instances where people wanted to apply Retention Policies to their mailboxes in Exchange 2010 to a massive amounts of mailboxes. I've come up with several different methods

  1. Apply the Retention Policy through your identity management software (not an original idea)
  2. Apply the Retention Policy to all mailboxes that do not have one via Scheduled Task
  3. Apply the Retention Policy to members of a specific AD Group
  4. Use Cmdlet Extension Agents for Exchange 2010

Option 1

Work with your Identity Management provider, they probably have the ability to modify the provisioning scripts

Option 2

Create a PowerShell script file and create a Scheduled Task
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010Set-ADServerSettings -ViewEntireForest $true #Apply Retention Policy - to Mailboxes that do not have one$policy = "DefaultPolicy"get-mailbox -filter {RetentionPolicy -eq $null} -resultsize unlimited | Set-Mailbox -RetentionPolicy $policy 

Option 3


Create a PowerShell script and change the $policy and $GroupName variables
#########################################################Apply Retention Policy to members of an AD GroupAdd-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010Set-ADServerSettings -ViewEntireForest $true $policy = "LegalPolicy"$GroupName="LegalUsers"$groupidentity = $(Get-Group $GroupName ).Identity.DistinguishedNameGet-Mailbox -Filter{(memberofgroup -eq $groupidentity)} -ResultSize Unlimited | Set-Mailbox -RetentionPolicy $policy 

Option 4

Learn how Cmdlet Extension Agents work and have at it.
http://technet.microsoft.com/en-us/library/dd335067(v=exchg.141).aspx

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete