external help file | online version | applicable | title | schema | author | ms.author | ms.reviewer |
---|---|---|---|---|---|---|---|
Microsoft.Exchange.TransportMailflow-Help.xml |
Exchange Online, Security & Compliance |
Get-ComplianceTag |
2.0.0 |
chrisda |
chrisda |
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.
Get-ComplianceTag [[-Identity] <ComplianceRuleIdParameter>]
[-IncludingLabelState]
[<CommonParameters>]
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.
Get-ComplianceTag | Format-Table -Auto Name,Priority,RetentionAction,RetentionDuration,Workload
This example returns a summary list of all labels.
Get-ComplianceTag -Identity "HR Content"
This example returns detailed information about the label named HR Content.
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
Parameter Sets: (All)
Aliases:
Applicable: Exchange Online, Security & Compliance
Required: False
Position: 1
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
{{ Fill IncludingLabelState Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Applicable: Exchange Online, Security & Compliance
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.