Retention policies are not automatically applied to end user mailboxes and must be set manually using either the Exchange Admin Center or the Exchange Management Shell. In this recipe, you'll learn how to apply retention policies to mailboxes from the command line, which will be useful when performing a retention policy assignment on a large number of mailboxes, or on a regular basis as new mailboxes are created.
Applying retention policies to mailboxes
How to do it...
Let's see how to apply retention policies to mailboxes by performing the following steps:
- To apply a retention policy to a mailbox, you use the Set-Mailbox cmdlet, specifying the retention policy name using the -RetentionPolicy parameter. For example...