Commands › Exchange Online

Start-RetentionAutoTagLearning

Exchange Online ExchangeOnlineManagement Start-*

Start auto-tagging for a specified mailbox or to cross-validate auto-tagging results for the mailbox. Messaging records management (MRM) must be configured before the Start-RetentionAutoTagLearning cmdlet can be used. For more information, see Understanding Retention Tags and Retention Policies).

Quick start script

# Start-RetentionAutoTagLearning — 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
Start-RetentionAutoTagLearning -Identity <MailboxIdParameter> -CrossValidate <SwitchParameter> | Format-List

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

Syntax — 2 parameter sets

CrossValidate

Start-RetentionAutoTagLearning [-Identity] <MailboxIdParameter>
 [-CrossValidate]
 [-NumberOfSegments <Int32>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Train

Start-RetentionAutoTagLearning [-Identity] <MailboxIdParameter>
 [-Clear]
 [-Train]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter identifies the mailbox. You can use any value that uniquely identifies the mailbox. For example:
-CrossValidate SwitchParameter yes The CrossValidate switch specifies whether items in the specified mailbox are being auto-tagged. You don't need to specify a value with this switch.
-Clear SwitchParameter The Clear switch specifies whether to clear auto-tags from the specified mailbox. You don't need to specify a value with this switch.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-NumberOfSegments Int32 The NumberOfSegments parameter specifies the number of segments. Auto-tagging divides a mailbox into the number of segments specified and learns tagging behavior from n-1 segments. Tags are then predicted for items...
-Train SwitchParameter The Train switch specifies whether to start the training algorithm for auto-tagging on the specified mailbox. You don't need to specify a value with this switch.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

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