Commands › Exchange Online

Search-MessageTrackingReport

Exchange Online ExchangeOnlineManagement Search-*

This cmdlet is functional only in on-premises Exchange. Use the Search-MessageTrackingReport cmdlet to find the unique message tracking report based on the search criteria provided. You can then pass this message tracking report ID to the Get-MessageTrackingReport cmdlet to get full message tracking information. For more information, see Get-MessageTrackingReport. The message tracking report cmdlets are used by the delivery reports feature. In Exchange Online, delivery reports are replaced by message trace (the Get-MessageTraceV2 and Get-MessageTraceDetailV2 cmdlets).

Quick start script

# Search-MessageTrackingReport — 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
Search-MessageTrackingReport -Identity <MailboxIdParameter> -Sender <SmtpAddress> | Format-List

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

Syntax — 2 parameter sets

SearchAsSender

Search-MessageTrackingReport [-Identity] <MailboxIdParameter> -Sender <SmtpAddress>
 [-BypassDelegateChecking]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-DoNotResolve]
 [-MessageEntryId <String>]
 [-MessageId <String>]
 [-ResultSize <Unlimited>]
 [-Subject <String>]
 [-TraceLevel <TraceLevel>]
 [-WhatIf]
 [<CommonParameters>]

SearchAsRecipient

Search-MessageTrackingReport [-Identity] <MailboxIdParameter>
 [-Recipients <SmtpAddress[]>]
 [-BypassDelegateChecking]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-DoNotResolve]
 [-MessageEntryId <String>]
 [-MessageId <String>]
 [-ResultSize <Unlimited>]
 [-Subject <String>]
 [-TraceLevel <TraceLevel>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter scopes the search to the specified mailbox. You can use any value that uniquely identifies the mailbox. For example:
-Sender SmtpAddress yes The Sender parameter specifies the email address of the message sender for messages that are sent to the mailbox that's specified by the Identity parameter.
-BypassDelegateChecking SwitchParameter The BypassDelegateChecking switch allows Help desk staff and administrators to track messages for any user. 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 This parameter is available only in on-premises Exchange.
-DoNotResolve SwitchParameter The DoNotResolve switch specifies whether to prevent the resolution of email addresses to display names. You don't need to specify a value with this switch.
-MessageEntryId String This parameter is reserved for internal Microsoft use.
-MessageId String 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...
-Recipients SmtpAddress[] The Recipients parameter filters the results by the email addresses of the specified recipients. You can specify multiple email addresses separated by commas.
-ResultSize Unlimited The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.
-Subject String The Subject parameter searches for messages with the specified Subject field value. If the value contains spaces, enclosed the value in quotation marks.
-TraceLevel TraceLevel The TraceLevel parameter specifies the details to include in the results. Valid values are:
-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.