en-US

LabelPolicy

Applies to : Security & Compliance

This cmdlet is functional only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.

Use the Set-Label cmdlet to modify sensitivity label policies in your organization.

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-LabelPolicy -Identity "Global Policy" -RemoveExchangeLocation $_ }.

Available cmdlets

Parameters

Name Type Default value Accepted values
RetryDistribution SwitchParameter
AddExchangeLocation MultiValuedProperty
AddExchangeLocationException MultiValuedProperty
AddLabels MultiValuedProperty
AddModernGroupLocation MultiValuedProperty
AddModernGroupLocationException MultiValuedProperty
AddOneDriveLocation MultiValuedProperty
AddOneDriveLocationException MultiValuedProperty
AddPublicFolderLocation MultiValuedProperty
AddSharePointLocation MultiValuedProperty
AddSharePointLocationException MultiValuedProperty
AddSkypeLocation MultiValuedProperty
AddSkypeLocationException MultiValuedProperty
AdvancedSettings PswsHashtable
Comment String
ExchangeAdaptiveScopes MultiValuedProperty
ExchangeAdaptiveScopesException MultiValuedProperty
MigrationId String
NextLabelPolicy PolicyIdParameter
PolicyRBACScopes MultiValuedProperty
PreviousLabelPolicy PolicyIdParameter
RemoveExchangeLocation MultiValuedProperty
RemoveExchangeLocationException MultiValuedProperty
RemoveLabels MultiValuedProperty
RemoveModernGroupLocation MultiValuedProperty
RemoveModernGroupLocationException MultiValuedProperty
RemoveOneDriveLocation MultiValuedProperty
RemoveOneDriveLocationException MultiValuedProperty
RemovePublicFolderLocation MultiValuedProperty
RemoveSharePointLocation MultiValuedProperty
RemoveSharePointLocationException MultiValuedProperty
RemoveSkypeLocation MultiValuedProperty
RemoveSkypeLocationException MultiValuedProperty
Setting PswsHashtable
Settings PswsHashtable

Examples

Example 1

Set-LabelPolicy -Identity "Global Policy" -AdvancedSettings @{EnableCustomPermissions="False"}

This example configures the specified advanced setting for the sensitivity label policy name Global Policy.

Microsoft Learn documentation