none
messagetrackinglods with recipient as parameter gives me submit ID in the logs

    Question

  • Hello,

    I was doing a messagetrackinglog on a recipient and the output produced more than what I thought. I was expecting only "RECEIVE" information but I also got  "SUBMIT" Event information as well. 

    Here is part of the output:

    SubmissionAssistant:MailboxTransportSubmissionEmailAssistant
    ConnectorId             :
    Source                  : STOREDRIVER
    EventId                 : SUBMIT
    InternalMessageId       :

    SourceContext           : MDB:c8e0e5b1-c295-4a6e-a5ca-f8a379df17bb, Mailbox:b277775f-1ada-4ee8-9084-ebad1063b13b, Event:31029185,
                              MessageClass:IPM.Note, CreationTime:2018-05-14T14:28:33.606Z, ClientType:MOMT,

    Why am I getting this information when I think I did not ask for it in the PS command?

    Thank you,

    $ExchangeServers = Get-TransportServer
            foreach ($Server in $Exchangeservers) {
    
            $messages1= Get-MessageTrackingLog -Recipients "userA@company.com" -Start (get-date).addhours(-1) -ResultSize unlimited
    }
    
    $messages1 | Where-Object {$_.eventid -match "submit"} |select -First 1 -Property *

    Monday, May 14, 2018 4:15 PM

Answers

  • Hi,

    If you want to get the all the "RECEIVE" events of the logs, you should specify the event id as receive, not submit. I modified your scripts and tested in my lab without errors.

    $ExchangeServers = Get-TransportServer
    $messages1=@()
    foreach ($Server in $Exchangeservers) {   
    $messages1+= Get-MessageTrackingLog -Server $Server.Name -Recipients "userA@company.com" -Start (get-date).addhours(-1) -ResultSize unlimited
    }
    
    $messages1 | Where-Object {$_.eventid -match "receive"} |select -First 1 -Property *

    Hope it helps.

    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.

    • Marked as answer by Tiri2014 Thursday, May 17, 2018 4:24 PM
    Tuesday, May 15, 2018 5:06 AM
    Moderator