Commands › Exchange Online
Start-RetentionAutoTagLearning
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.