none
Exchange Server Get-Messagetrackinglog to get the actual Inbound & Outbound email flow ?

    Question

  • People,

    I need some help and clarification of using the exact Exchange PowerShell script Get-MessageTrackingLog like the below example:

    Get-TransportServer | ForEach-Object { Write-Host $_.Name Get-Messagetrackinglog -Server $_.Name -Resultsize Unlimited -Start "01/03/2018 12:00:00 AM" -End "29/03/2018 5:00:00 PM" -EventID SEND | Where-Object { $_.Source -eq "SMTP"} | Select @{Name="Recipients";Expression={ $_.Recipients -join ';' }}, Sender, ClientIp, ClientHostname, Timestamp, EventID, Source, ServerHostname, ServerIp, MessageSubject, TotalBytes, ConnectorId } | Export-Csv C:\Logs\Result.csv -NoTypeInformation

    • Getting all of the confirmed Inbound emails: -EventID DELIVER | Where-Object { $_.Source -eq "StoreDriver"}

    • Getting all of the confirmed Outbound emails: -EventID SEND | Where-Object { $_.Source -eq "SMTP"}

    After reading: https://technet.microsoft.com/en-us/library/bb124375%28v=exchg.150%29.aspx

    Any help would be greatly appreciated.


    /* Server Support Specialist */


    Thursday, March 29, 2018 4:52 AM

Answers

  • Hi,

    It seems that you have a good start from here, I am testing your sample scripts and will give your a feedback soon, now just share a scrips with you for reference:

    Powershell script to report on total send/received e-mails in Exchange v2.0

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, March 30, 2018 6:25 AM
    Moderator

All replies

  • Hi,

    It seems that you have a good start from here, I am testing your sample scripts and will give your a feedback soon, now just share a scrips with you for reference:

    Powershell script to report on total send/received e-mails in Exchange v2.0

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, March 30, 2018 6:25 AM
    Moderator
  • Hi,

    Just checking in to see if above information was helpful. Please let us know if you would like further assistance.

    Regards, 

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to shareexplore and talk to experts about Microsoft Teams.

    Tuesday, April 3, 2018 10:43 AM
    Moderator
  • Thanks !

    /* Server Support Specialist */

    Friday, May 25, 2018 3:19 AM