Get-ComplianceTag

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

Use the Get-ComplianceTag cmdlet to view labels in the Security & Compliance Center. Labels apply retention settings to content.

Note: We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see Connect to Exchange Online PowerShell.

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

Syntax

Get-ComplianceTag
   [[-Identity] <ComplianceRuleIdParameter>]
   [-IncludingLabelState]
   [<CommonParameters>]

Description

You need to be assigned permissions in the Security & Compliance Center before you can use this cmdlet. For more information, see Permissions in the Security & Compliance Center.

Examples

Example 1

Get-ComplianceTag | Format-Table -Auto Name,Priority,RetentionAction,RetentionDuration,Workload

This example returns a summary list of all labels.

Example 2

Get-ComplianceTag -Identity "HR Content"

This example returns detailed information about the label named HR Content.

Parameters

-Identity

The Identity parameter specifies the label that you want to view. You can use any value that uniquely identifies the tag. For example:

  • Name
  • Distinguished name (DN)
  • GUID
Type:ComplianceRuleIdParameter
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance Center
-IncludingLabelState

{{ Fill IncludingLabelState Description }}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance Center

Inputs

Outputs