Commands › Exchange Online
New-LabelPolicy
For more information, see Security & Compliance PowerShell. Use the New-LabelPolicy cmdlet to create sensitivity label policies in your organization.
Quick start script
# New-LabelPolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-LabelPolicy
$before | Format-List
# 3. Make the change (dry run first)
New-LabelPolicy -Name <String> -Labels <MultiValuedProperty> -WhatIf
New-LabelPolicy -Name <String> -Labels <MultiValuedProperty>
# 4. Verify and diff
$after = Get-LabelPolicy
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
New-LabelPolicy -Name <String> -Labels <MultiValuedProperty>
[-AdvancedSettings <PswsHashtable>]
[-Comment <String>]
[-Confirm]
[-ExchangeAdaptiveScopes <MultiValuedProperty>]
[-ExchangeAdaptiveScopesException <MultiValuedProperty>]
[-ExchangeLocation <MultiValuedProperty>]
[-ExchangeLocationException <MultiValuedProperty>]
[-Force]
[-MigrationId <String>]
[-ModernGroupLocation <MultiValuedProperty>]
[-ModernGroupLocationException <MultiValuedProperty>]
[-OneDriveLocation <MultiValuedProperty>]
[-OneDriveLocationException <MultiValuedProperty>]
[-PolicyRBACScopes <MultiValuedProperty>]
[-PublicFolderLocation <MultiValuedProperty>]
[-Setting <PswsHashtable>]
[-Settings <PswsHashtable>]
[-SharePointLocation <MultiValuedProperty>]
[-SharePointLocationException <MultiValuedProperty>]
[-SkypeLocation <MultiValuedProperty>]
[-SkypeLocationException <MultiValuedProperty>]
[-WhatIf]
[<CommonParameters>]
Parameters (24)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.