Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Placing mailboxes on Retention Hold


When a user goes on vacation or will be out of the office for an extended period of time, you may need to suspend the processing of the retention policy applied to their mailbox. This recipe will show you how to use the Exchange Management Shell to place mailboxes on Retention Hold, as well as how to remove the Retention Hold and discover which mailboxes are currently configured for Retention Hold.

How to do it...

Let's see how to place a mailbox on Retention Hold using the following steps:

  1. To place a mailbox on Retention Hold, use the Set-Mailbox cmdlet:

    Set-Mailbox -Identity dsmith -RetentionHoldEnabled $true
    
  2. To remove the Retention Hold setting from the mailbox, use the same command, but set the -RetentionHoldEnabled parameter to $false:

    Set-Mailbox -Identity dsmith -RetentionHoldEnabled $false
    

How it works...

When Retention Hold is enabled for a mailbox, the user who owns that mailbox can still open their mailbox, send and receive messages, delete items...