Get-AutoSensitivityLabelPolicy

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

Use the Get-AutoSensitivityLabelPolicy cmdlet to view auto-labeling policies in your organization.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Get-AutoSensitivityLabelPolicy
   [[-Identity] <PolicyIdParameter>]
   [-DistributionDetail]
   [-ForceValidate <Boolean>]
   [-IncludeProgressFeedback]
   [-IncludeTestModeResults <Boolean>]
   [<CommonParameters>]

Description

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.

Examples

Example 1

Get-AutoSensitivityLabelPolicy -Identity "Employee Numbers" -IncludeTestModeResults $true

This example returns detailed information about the autosensitivity label policy named Employee Numbers. The IncludeTestModeResults parameter and value allows you to see the status of test mode.

Parameters

-DistributionDetail

The DistributionDetail switch returns detailed policy distribution information in the DistributionResults property. You don't need to specify a value with this switch.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ForceValidate

The ForceValidate parameter specifies whether to include details related to the AdminUnits of users, groups, or sites in the policy. Valid values are:

  • $true: Various properties in the policy include details of the AdminUnits that are associated with current set of selected users, groups, or sites.
  • $false: The output doesn't contain the information. This is the default value.
Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-Identity

The Identity parameter specifies the auto-labeling policy that you want to view. You can use any value that uniquely identifies the policy. For example:

  • Name
  • Distinguished name (DN)
  • GUID
Type:PolicyIdParameter
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Security & Compliance

-IncludeProgressFeedback

IncludeProgressFeedback specifies whether to include the labeling progress of files in SharePoint Online or OneDrive for Business. You don't need to specify a value with this switch.

If you use this switch, the command shows the progress of files to be labeled, files labeled in the last 7 days, and total files labeled for enabled auto-labeling policies.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-IncludeTestModeResults

The IncludeTestModeResults parameter specifies whether to include the status of test mode in the policy details. Valid values are:

  • $true: Include the status of test mode in the policy details.
  • $false: Don't include the status of test mode in the policy details.
Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance