Message tracking is a way to identify the issues arises during mail flow, the exchange mail server maintains a message tracking log which stores each message event on a single line in the log file. The message event stores the event information in organized way by fields and these fields are separated by commas. Each field name is generated by mail server and is descriptive enough to determine the type of information that it contains.
Exchange Server is a Mail Server, Contact Manager and Calendaring Software developed by Microsoft that facilitate users the send or receive e-mails. When a sends a message then it follow a well specified path through transport server, Hub Server and Edge Transport server role. To track the message route you need to specify the particular information which is unique for every user so that it can be easily traced like Message Event ID, Log Value, Recipient Name, Sender Name etc. When outbound message is not delivered to receiver then an event id is created with the error message and stored in NDR (Non Delivery Report) which can be further used to track the message log.
Exchange server is enabled with very vital and useful facility to track the path of mail flow by Message Tracking Logs. The complete message transfer can be monitored using this feature, in exchange server Edge Transport, Mail Server and Hub Transport layer are responsible for the transmission of message on network. Message tracking become very necessary in troubleshooting the exchange mail sever error. In this blog I am going to discuss the PowerShell command which is useful to track the message.
Use the Get-MessageTrackingLog Cmdlet in the EMC to search Message Tracking Logs. This command will result complete description of all associated parameter as shown in figure given below.
You can use a PowerShell Parameter "-Server" to search remote server this parameter is used when there is separate Management Server the command is given below.
Search the Message Tracking Log on Hub Transport Server by using the command given below. Hub Transport Server is installed on Mail Server.
If you want to search a particular server with in complete site then use the command given below.
Now use the insert Cmdlet to get Message-Tracking Log run the PowerShell Command shown below.
Note: - The above command will return only 1000 results because its default size is 1000 results. You can easily change the default result size by running the command "-ResultSize" which is given below.
Every message being Send or Receive has to pass through many event session which need to add some event ID to specify the particular event. It will reflect result as given below.
Export the complete detail in CSV format by simply running the command Export-CSV and this command will return a result of complete message. One thing you need to know that this command will return the not useful information as well as shown below.
To resolve this use you need to pipe the result of tracking logs in Cmdlet because without this action the command is not able to specify the date and time just run the command given below.
Now you will find the complete resultant data in readable and useful format in CSV format. The data will be shown as displayed below.
I have tried discuss all related aspects of Message Tracking and I hope that this effort will be helpful for you to resolve the non-delivery issue of message and prevent to undergo the stopping the mail flow and I am sure that this article will help you to resolve Message Tracking Log using PowerShell Command.