Commands › Exchange Online
Get-MessageTrace
> [!NOTE] > This cmdlet is replaced by the Get-MessageTraceV2 cmdlet and will eventually be deprecated. Use the Get-MessageTrace cmdlet to trace messages as they pass through the cloud-based organization.
Quick start script
# Get-MessageTrace — 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-MessageTrace | Format-List
# 3. Export for evidence / drift tracking
Get-MessageTrace | Export-Clixml .\MessageTrace-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-MessageTrace
[-EndDate <DateTime>]
[-FromIP <String>]
[-MessageId <MultiValuedProperty>]
[-MessageTraceId <Guid>]
[-Page <Int32>]
[-PageSize <Int32>]
[-ProbeTag <String>]
[-RecipientAddress <MultiValuedProperty>]
[-SenderAddress <MultiValuedProperty>]
[-StartDate <DateTime>]
[-Status <MultiValuedProperty>]
[-ToIP <String>]
[<CommonParameters>]
Parameters (12)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.