Commands › Exchange Online

Get-RetentionPolicyTag

Exchange Online ExchangeOnlineManagement Get-*

Retrieve settings for a retention tag.

Quick start script

# Get-RetentionPolicyTag — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-RetentionPolicyTag | Format-List

# 3. Export for evidence / drift tracking
Get-RetentionPolicyTag | Export-Clixml .\RetentionPolicyTag-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Identity

Get-RetentionPolicyTag [[-Identity] <RetentionPolicyTagIdParameter>]
 [-DomainController <Fqdn>]
 [-IncludeSystemTags]
 [-Types <ElcFolderType[]>]
 [<CommonParameters>]

Mailbox

Get-RetentionPolicyTag [-Mailbox <MailboxIdParameter>]
 [-OptionalInMailbox]
 [-DomainController <Fqdn>]
 [-IncludeSystemTags]
 [-Types <ElcFolderType[]>]
 [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Identity RetentionPolicyTagIdParameter The Identity parameter specifies the name of the tag.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-IncludeSystemTags SwitchParameter The IncludeSystemTags switch specifies whether to return any system tags. You don't need to specify a value with this switch.
-Mailbox MailboxIdParameter The Mailbox parameter returns the retention tags that are assigned to the retention policy that's applied to the specified mailbox. You can use any value that uniquely identifies the mailbox. For example:
-OptionalInMailbox SwitchParameter The OptionalInMailbox parameter is used with the Mailbox parameter to return any opt-in retention tags that are assigned to the specified mailbox. You don't need to specify a value with this switch.
-Types ElcFolderType[] The Types parameter specifies the type of retention tag to return. Valid values include:

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.