Commands › Exchange Online

Get-AutoSensitivityLabelRule

Exchange Online ExchangeOnlineManagement Get-*

For more information, see Security & Compliance PowerShell. Use the Get-AutoSensitivityLabelPolicy cmdlet to view auto-labeling policy rules in your organization.

Quick start script

# Get-AutoSensitivityLabelRule — 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-AutoSensitivityLabelRule | Format-List

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

Syntax

Get-AutoSensitivityLabelRule [[-Identity] <ComplianceRuleIdParameter>]
 [-Confirm]
 [-ForceValidate]
 [-IncludeExecutionRuleGuids <Boolean>]
 [-IncludeExecutionRuleInformation <Boolean>]
 [-Policy <PolicyIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity ComplianceRuleIdParameter The Identity parameter specifies the auto-labeling policy rule that you want to view. You can use any value that uniquely identifies the rule. For example:
-Confirm SwitchParameter This parameter is reserved for internal Microsoft use.
-ForceValidate SwitchParameter {{ Fill ForceValidate Description }}
-IncludeExecutionRuleGuids Boolean The IncludeExecutionRuleGuids parameter specifies whether to include the execution rule GUID in the rule details. Valid values are:
-IncludeExecutionRuleInformation Boolean The IncludeExecutionRuleInformation parameter specifies whether to include the execution rule information in the rule details. Valid values are:
-Policy PolicyIdParameter The Policy parameter filters the auto-labeling policy rule results by the associated auto-labeling policy. You can use any value that uniquely identifies the policy. For example:
-WhatIf SwitchParameter This parameter is reserved for internal Microsoft use.

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