Add all users in specific Mailbox Database to a Specific Retention Policy in Exchange 2010

2017-12-01T11:14:48+00:00 June 8th, 2011|Exchange|

This is a quick command to add every mailbox in a specific database to a Specific Retention Policy,

  1. Fist off run “get-mailboxdatabase” and make a note of the name of the mailbox database you want to use.
  2. Now Run “Get-retentionpolicy” and make a note of the name of the policy also
  3. Now Run “get-mailbox –database “name of DB from step 1” -resultsize unlimited | set-mailbox -retentionpolicy “Name of retention policy from step 2”

This will now have added every mailbox from the mailbox database you specified to the desired retention policy Smile