en-US

AutoSensitivityLabelPolicy

Applies to : Security & Compliance

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

Use the Set-AutoSensitivityLabelPolicy cmdlet to modify auto-labeling 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.

Available cmdlets

Parameters

Name Type Default value Accepted values
AddExchangeLocation MultiValuedProperty
AddOneDriveLocation MultiValuedProperty
AddOneDriveLocationException MultiValuedProperty
AddSharePointLocation MultiValuedProperty
AddSharePointLocationException MultiValuedProperty
ApplySensitivityLabel String
ApplySensitivityLabelOverwriteWorkloads Workload
AutoEnableAfter TimeSpan
Comment String
Enabled Boolean
ExceptIfOneDriveSharedBy RecipientIdParameter[]
ExceptIfOneDriveSharedByMemberOf RecipientIdParameter[]
ExchangeAdaptiveScopes MultiValuedProperty
ExchangeAdaptiveScopesException MultiValuedProperty
ExchangeSender SmtpAddress[]
ExchangeSenderException SmtpAddress[]
ExchangeSenderMemberOf SmtpAddress[]
ExchangeSenderMemberOfException SmtpAddress[]
ExternalMailRightsManagementOwner SmtpAddress
Locations String
Mode PolicyMode Enable, TestWithNotifications, TestWithoutNotifications, Disable, PendingDeletion
OneDriveAdaptiveScopes MultiValuedProperty
OneDriveAdaptiveScopesException MultiValuedProperty
OneDriveSharedBy RecipientIdParameter[]
OneDriveSharedByMemberOf RecipientIdParameter[]
OverwriteLabel Boolean
PolicyRBACScopes MultiValuedProperty
PolicyTemplateInfo PswsHashtable
Priority System.Int32
RemoveExchangeLocation MultiValuedProperty
RemoveOneDriveLocation MultiValuedProperty
RemoveOneDriveLocationException MultiValuedProperty
RemoveSharePointLocation MultiValuedProperty
RemoveSharePointLocationException MultiValuedProperty
RetryDistribution SwitchParameter
SharePointAdaptiveScopes MultiValuedProperty
SharePointAdaptiveScopesException MultiValuedProperty
SpoAipIntegrationEnabled Boolean
StartSimulation Boolean

Examples

Example 1

Set-AutoSensitivityLabelPolicy -Identity "Main PII" -AddSharePointLocation "https://my.url1","https://my.url2" -AddOneDriveLocation "https://my.url3","https://my.url4"

This example adds the specified URLs to the SharePoint and OneDrive locations for the autolabeling policy named Main PII without affecting the existing URL values.

Microsoft Learn documentation