This is a quick command to add every mailbox in a specific database to a Specific Retention Policy,
- Fist off run “get-mailboxdatabase” and make a note of the name of the mailbox database you want to use.
- Now Run “Get-retentionpolicy” and make a note of the name of the policy also
- 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