Commands › Exchange Online

Get-HoldCompliancePolicy

Exchange Online ExchangeOnlineManagement Get-*

For more information, see Security & Compliance PowerShell. Use the Get-HoldCompliancePolicy to view existing preservation policies in the Microsoft Purview compliance portal. **Note**: The Get-HoldCompliancePolicy cmdlet is replaced by the Get-RetentionCompliancePolicy cmdlet. If you have scripts that use Get-HoldCompliancePolicy, update them to use Get-RetentionCompliancePolicy.

Quick start script

# Get-HoldCompliancePolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-HoldCompliancePolicy | Format-List

# 3. Export for evidence / drift tracking
Get-HoldCompliancePolicy | Export-Clixml .\HoldCompliancePolicy-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-HoldCompliancePolicy [[-Identity] <PolicyIdParameter>]
 [-DistributionDetail]
 [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-Identity PolicyIdParameter The Identity parameter specifies the preservation policy that you want to view. You can use any value that uniquely identifies the policy. For example:
-DistributionDetail SwitchParameter The DistributionDetail switch returns detailed policy distribution information in the DistributionResults property. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.