locked
How can I get Sender Display Name using Get-MessageTrackingLog? RRS feed

  • Question

  • Hi, could you please help me. We have got a monitoring system at work which monitors some devices, so if something wrong happening with these devices email is sent from MASTER email (Customer Name <blabla@master.com>) to us. I'm trying to get a list of all emails of that monitoring mailbox using PoweShell command Get-MessageTrackingLog and export them to CSV file. In the end of the day I need CSV file with 3 columns: TimeStamp, MessageSubject and SenderDisplayName! Yes, I need Sender Display Name cause all emails are sent from one MASTER email (Customer Name <blabla@master.com>) and only difference between them is sender Display Name which is cexactly what I need.   

    This is the code I'm using:

    Get-MessageTrackingLog -EventId Receive | Select Timestamp, MessageSubject, Sender | Export-CSV C:\NagiosAlerts.csv –NoTypeInformation

    So how can I get sender Display Name(Customer Name) using Get-MessageTrackingLog insted of Sender email (<blabla@master.com>)? 



    • Edited by muntjan Thursday, December 4, 2014 4:29 PM
    Thursday, December 4, 2014 3:31 PM

All replies

  • The DisplayName is not recorded in the Logs only the EmailAddresses are so there Is nothing you can do with Message Tracking to get this the way you want. You need to look at another property may soureIP or include something in the Subject of the Email (eg a customerId in the Subject is a much better option) to give you some differentiation. Otherwise you need to access the Email directly from the Mailbox it was sent to and then extract the DisplayName from the message (or use a journaling on those emails etc)

    Cheers
    Glen

    Friday, December 5, 2014 3:51 AM