Hi @Hram Admin ,
Welcome to the Microsoft Q&A platform!
Based on your description, you are trying to track which specific messages have a specific transport rule applied to them. To solve the problem you are facing, you can modify the PowerShell command to include more detailed information about each message, such as the message ID and subject. Here is an updated approach:
- You can use Select-Object to specify the properties you want to see in the output.
- Make sure you filter the messages correctly based on the rule ID and action.
Here is an example of how to do this:
$startDate = "01/27/2024 09:00:00"
$endDate = "01/28/2025 21:00:00"
$ruleID = "f94242a7-ebe6-46f4-9612-ec4745b26353"
Get-TransportService | Get-MessageTrackingLog -Start $startDate -End $endDate -Source Agent |
Where-Object { $_.EventData -like "*$ruleID*" -and $_.EventData -like "*Action=*" } |
Select-Object MessageId, MessageSubject, EventData
This command will:
- Retrieve the message tracking log for the specified date range.
- Filter the log to include only those where the specified rule ID and action exist.
- Select and display the message ID, subject, and event data for each matching message.
Notes:
I noticed that your picture leaked privacy, and I have covered it for you. I hope you will pay attention to privacy protection when posting cases on the forum in the future to avoid unnecessary losses. Thanks for your understanding!
Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.
Best,
Jake Zhang