CaseHoldPolicy
Applies to : Security & Compliance
This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.
Use the Set-CaseHoldPolicy cmdlet to modify existing case hold policies in the Microsoft Purview compliance portal.
Note: Running this cmdlet causes a full synchronization across your organization, which is a significant operation. If you need to update multiple policies, wait until the policy distribution is successful before running the cmdlet again for the next policy. If you need to update a policy multiple times, make all changes in a single call of the cmdlet. For information about the distribution status, see Get-CaseHoldPolicy.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft Purview compliance portal.
Note: Don't use a piped Foreach-Object command when adding or removing scope locations: "Value1","Value2",..."ValueN" | Foreach-Object {Set-CaseHoldPolicy -Identity "Regulation 123 Compliance" -RemoveExchangeLocation $_}.
Available cmdlets
Parameters
| Name | Type | Default value | Accepted values |
|---|---|---|---|
| RetryDistribution | SwitchParameter | ||
| AddExchangeLocation | MultiValuedProperty | ||
| AddPublicFolderLocation | MultiValuedProperty | ||
| AddSharePointLocation | MultiValuedProperty | ||
| Comment | String | ||
| Enabled | Boolean | ||
| RemoveExchangeLocation | MultiValuedProperty | ||
| RemovePublicFolderLocation | MultiValuedProperty | ||
| RemoveSharePointLocation | MultiValuedProperty |
Examples
Example 1
Set-CaseHoldPolicy -Identity "Regulation 123 Compliance" -AddExchangeLocation "Kitty Petersen" -AddSharePointLocation "https://contoso.sharepoint.com/sites/teams/finance" -RemovePublicFolderLocation All -Comment "Added new counsel, 9/9/14" This example makes the following changes to the existing case hold policy named "Regulation 123 Compliance":
- Adds the mailbox for the user named Kitty Petersen.
- Adds the SharePoint site
https://contoso.sharepoint.com/sites/teams/finance. - Removes public folders.
- Updates the comment.