Skip to Main Content
Microsoft Exchange 2010 PowerShell Cookbook
book

Microsoft Exchange 2010 PowerShell Cookbook

by Mike Pfeiffer
July 2011
Intermediate to advanced content levelIntermediate to advanced
480 pages
11h 54m
English
Packt Publishing
Content preview from Microsoft Exchange 2010 PowerShell Cookbook

Applying retention policies to mailboxes

Retention policies are not automatically applied to end user mailboxes and must be set manually using either the Exchange Management Console 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.

How to do it...

  1. 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, to do this for one user, the command would look something like this:
    Set-Mailbox dsmith -RetentionPolicy AllUsers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Jonas Andersson, Mike Pfeiffer

Publisher Resources

ISBN: 9781849682466Other