Get-MessageTrackingLog (RTM)

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007

Use the Get-MessageTrackingLog cmdlet to search message information that is stored in the message tracking log.

Syntax

Get-MessageTrackingLog [-DomainController <Fqdn>] [-End <DateTime>] [-EventId <String>] [-InternalMessageId <String>] [-MessageId <String>] [-MessageSubject <String>] [-Recipients <String[]>] [-Reference <String>] [-ResultSize <Unlimited>] [-Sender <String>] [-Server <ServerIdParameter>] [-Start <DateTime>]

Detailed Description

A unique message tracking log exists on each computer that has the Hub Transport server role, the Mailbox server role, or the Edge Transport server role installed. The message tracking log is a comma-separated value (CSV) file that contains detailed information about the history of each e-mail message as it travels through an individual server.

To run the Get-MessageTrackingLog cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

To run the Get-MessageTrackingLog cmdlet on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter.

End

Optional

System.DateTime

This parameter returns message tracking log entries up to, but not including, the specified End date and time by using the regional format of the computer on which the cmdlet is run.

EventId

Optional

System.String

This parameter returns message tracking log entries with the following possible event categories: BadMail, Defer Deliver, DSN, Expand, Fail, PoisonMessage, Receive, Redirect, Resolve, Send, Submit, and Transfer.

InternalMessageId

Optional

System.String

This parameter returns message tracking log entries with a value of InternalMessagID. InternalMessageID is a message identifier that is assigned by the Exchange 2007 server that is currently processing the message.

A specific message's value of InternalMessageID is different in the message tracking log of every Exchange 2007 server that is involved in the delivery of the message.

MessageId

Optional

System.String

This parameter returns message tracking log entries with the specified Message-ID header field. If the Message-ID: header field is blank or does not exist, an arbitrary value is assigned. This value is constant for the lifetime of the message.

MessageSubject

Optional

System.String

This parameter returns message tracking log entries with the specified value of the Subject: header field in the message. By default, message subjects are stored in the message tracking logs. To disable logging of message subjects, use the following command:

Set-TransportServer <Identity> -MessageTrackingLogSubjectLoggingEnabled $false

Recipients

Optional

System.String[]

This parameter returns any message tracking log entries with the specified recipient's Simple Mail Transfer Protocol (SMTP) e-mail addresses. Multiple individual recipients that are included in a single message are logged by using a single message tracking log entry. Unexpanded distribution group recipients are logged by using the distribution group's SMTP e-mail address. Multiple recipient values can be specified by using commas as a delimiter.

Reference

Optional

System.String

This parameter returns message tracking log entries with the specified value in the Reference field.

The Reference field contains additional information for specific types of EventID:

  • Send   The Reference field contains the Internet-Message-Id of any delivery status notification (DSN) messages.

  • Transfer   The Reference field contains the Internal-Message-Id of the message that is being forked.

  • DSN   The Reference field contains the Internet-Message-Id of the message that caused the DSN.

For all other types of EventID, the Reference field is blank.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

This parameter determines the maximum number of message tracking log entries to display. By default, a maximum of 1,000 entries are displayed. To display all entries, use the value Unlimited.

Sender

Optional

System.String

This parameter returns message tracking log entries with the specified sender's SMTP e-mail address.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

This parameter specifies the Exchange 2007 server that contains the message tracking logs to be searched. The Server parameter can take any of the following values for the target server:

  • Name

  • Fully qualified domain name (FQDN)

  • Distinguished name (DN)

  • Legacy Exchange DN

  • GUID

Start

Optional

System.DateTime

This parameter returns message tracking log entries starting with the specified Start date and time by using the regional format of the computer on which the cmdlet is run.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The first example shows how to use the Get-MessageTrackingLog cmdlet to retrieve message tracking log entries that were created between 03/13/06 at 9:00 AM and 03/15/06 at 5:00 PM with a Sender value of tbremer@contoso.com.

Note

The date format that is used in this example is English (US). Use the date format that is configured on your Exchange Server 2007 computer. The date that you specify is converted automatically into the Coordinated Universal Time (UTC) format that is used internally by Exchange 2007 to store entries in the message tracking logs.

The second example shows how pipe the output of the Get-MessageTrackingLog cmdlet to the Format-List cmdlet to view additional information that is available in the message tracking log.

For more information about pipelining, see Pipelining.

For more information about how to work with the output of a command, see Working with Command Output.

Get-MessageTrackingLog -Start "03/13/2006 9:00AM" -End "03/15/2006 5:00PM" -Sender "tbremer@contoso.com"
Get-MessageTrackingLog -Start "03/13/2006 9:00AM" -End "03/15/2006 5:00PM" -Sender "tbremer@contoso.com" | Format-List