Bewerken

Delen via


Get-ComplianceTag

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

Use the Get-ComplianceTag cmdlet to view retention labels in the Microsoft Purview compliance portal. Retention labels apply retention settings to content.

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

Syntax

Get-ComplianceTag
   [[-Identity] <ComplianceRuleIdParameter>]
   [-IncludingLabelState]
   [<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-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
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance

-IncludingLabelState

{{ Fill IncludingLabelState Description }}

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