Troubleshooting Exchange Online transport rules – new cmdlet "Test Message"

Exchange Logo[English]A little tip for Exchange Online administrators. What to do if issues occur when processing mails due to mail flow rules. The options for tenant administrators were previously limited, and Microsoft support often had to be called. Microsoft has now reacted and is trying to support administrators of Exchange Online tenants with a corresponding PowerShell cmdlet "Test Message" to diagnose the use of Exchange Transport Rules (ETRs).


Advertising

In the past, Microsoft writes in this Techcommunity article, administrators had only limited possibilities to check whether e-mails were processed correctly by the Exchange Transport Rules (ETRs).

  • You could only rely on Message Trace, which only showed the rules that matched (but not all the rules that were evaluated).
  • Another option was Extended Message Trace, which could display the rules evaluated for a particular message.

However, the latter was a time-consuming process. Message Trace and Extended Message Trace also do not allow administrators to see why the rule did not match.

Support through a cmdlet

To enable tenant administrators to investigate problems related to the processing of Mail Flow Rules (ETRs), Microsoft has updated the "Test-Message" cmdlet in the Exchange Online PowerShell (the syntax of the cmdlet is described in the linked support article). I came across the whole thing in the following tweet.

Troubleshooting Exchange Online Transport Rules

The Cmdlet "Test-Message" simulates real-world behavior by sending test email messages into the actual Exchange Online ETR pipeline. Administrators immediately receive an evaluation report generated during the test that includes information about each rule evaluation as well as each condition/exception evaluation result per rule.


Advertising

Improvements to the Cmdlet

Microsoft writes that the updates to the Exchange Online Test Message cmdlet brings some improvements. These include the following:

  • The logs are more comprehensive, and it is now possible to distinguish conditions from exceptions.
  • The generated report has been updated to include the values of the message properties that are evaluated by the conditions and exceptions of the transport rules.
  • Once a rule has been evaluated, a final verdict is given showing whether the rule matches or not.

According to Microsoft, these changes can give tenant administrators insight into the properties that are passed to the ETR conditions/exceptions and the evaluation results per condition/exception.

Execute the Cmdlet "Test Message"

According to Microsoft, there is currently no way to use test messages from the Exchange Admin Center. Instead, the tenant administrator must connect to Exchange Online PowerShell. The Test Message cmdlet can then be executed in two ways:

  • With only the sender and recipient as parameters
  • With sample message data provided in the MessageFileData parameter

If the Cmdlet "Test-Message" is only executed with the "-Sender" and "-Recipients" parameters, the message text and the subject contain a standard text. The Subject field then contains the text "Exchange diagnostic message" while the body contains the text "This message was created by an Exchange administrator. You can ignore this message unless your administrator has requested otherwise.".

In the Techcommunity article How to troubleshoot Exchange Online Transport Rules using the Test-Message cmdlet, Microsoft explains how to use the "Test-Message" cmdlet using several examples and also shows the generated reports. It also lists what tenant administrators need to pay attention to before running the cmdlet.


Advertising

This entry was posted in Software and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Please note the rules for commenting on the blog (first comments and linked posts end up in moderation, I release them every few hours, I rigorously delete SEO posts/SPAM).