Commands › Exchange Online

Get-Label

Exchange Online ExchangeOnlineManagement Get-*

For more information, see Security & Compliance PowerShell. Use the Get-Label cmdlet to view sensitivity labels in your organization.

Quick start script

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

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

Syntax

Get-Label [[-Identity] <ComplianceRuleIdParameter>]
 [-IncludeDetailedLabelActions]
 [-SkipValidations]
 [-ReturnModernLabelScheme]
 [-ValidateContentTypeRemoval]
 [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Identity ComplianceRuleIdParameter The Identity parameter specifies the sensitivity label that you want to view. You can use any value that uniquely identifies the label. For example:
-IncludeDetailedLabelActions SwitchParameter The IncludeDetailedLabelActions parameter specifies whether to expand label actions into properties for better readability. You don't need to specify a value with this switch.
-ReturnModernLabelScheme SwitchParameter {{ Fill ReturnModernLabelScheme Description }}
-SkipValidations SwitchParameter The SkipValidations switch specifies whether to skip the retrieval of encryption properties configured in sensitivity labels. You don't need to specify a value with this switch.
-ValidateContentTypeRemoval SwitchParameter {{ Fill ValidateContentTypeRemoval Description }}

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