Commands › Exchange Online

Get-MessageTrace

Exchange Online ExchangeOnlineManagement Get-*

> [!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)

ParameterTypeRequiredWhat it controls
-EndDate DateTime The EndDate parameter specifies the end date of the date range.
-FromIP String The FromIP parameter filters the results by the source IP address. For incoming messages, the value of FromIP is the public IP address of the SMTP email server that sent the message.
-MessageId MultiValuedProperty The MessageId parameter filters the results by the Message-ID header field of the message. This value is also known as the Client ID. The format of the Message-ID depends on the messaging server that sent the...
-MessageTraceId Guid The MessageTraceId parameter filters the results by the message trace ID value of the message. This GUID value is generated for every message that's processed by the system (for example, c20e0f7a-f06b-41df-fe33-08d9da155ac1).
-Page Int32 The Page parameter specifies the page number of the results you want to view. Valid input for this parameter is an integer between 1 and 1000. The default value is 1.
-PageSize Int32 The PageSize parameter specifies the maximum number of entries per page. Valid input for this parameter is an integer between 1 and 5000. The default value is 1000.
-ProbeTag String This parameter is reserved for internal Microsoft use.
-RecipientAddress MultiValuedProperty The RecipientAddress parameter filters the results by the recipient's email address. You can specify multiple values separated by commas.
-SenderAddress MultiValuedProperty The SenderAddress parameter filters the results by the sender's email address. You can specify multiple values separated by commas.
-StartDate DateTime The StartDate parameter specifies the start date of the date range.
-Status MultiValuedProperty The Status parameter filters the results by the delivery status of the message. Valid values for this parameter are:
-ToIP String The ToIP parameter filters the results by the destination IP address. For outgoing messages, the value of ToIP is the public IP address in the resolved MX record for the destination domain. For incoming messages to...

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