none
Message Tracking for more than one user

    Question

  • I have a task to create a report for 30 or so users of message activity over the past week in Exchange 2007. I can get an individual user to work by using the commands:

    Get-MessageTrackingLog -Sender "will not let me put email in here"  -EventID "DELIVER" -Start "xx/xx/xxxx 12:00:00 AM" -End "xx/xx/xxxx 11:59:00 PM" -ResultSize unlimited | select timestamp, eventid, messagesubject, sender, {$_.recipients}, totalbytes | export-csv c:\message\sendtrak.csv

    Get-MessageTrackingLog -recipient "will not let me put email in here"  -EventID "DELIVER" -Start "xx/xx/xxxx 12:00:00 AM" -End "xx/xx/xxxx 11:59:00 PM" -ResultSize unlimited | select timestamp, eventid, messagesubject, sender, {$_.recipients}, totalbytes | export-csv c:\message\rectrak.csv

    I have all the names in a text file line by line and was trying to import them into EMS and use the foreach command but couldn't get it to work. Could someone help me so I can run the above commands against all the users that I need to?

    Thanks,

    Bill

    Monday, February 18, 2013 2:25 PM

Answers

  • I'd use this:

    http://gallery.technet.microsoft.com/exchange/bb94b422-eb9e-4c53-a454-f7da6ddfb5d6

    And select out the addresses for the users in the list when it's done.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Monday, February 18, 2013 7:37 PM

All replies

  • $Senders = Get-Content 'c:\somedir\senderlist.txt'
    
    Get-MessageTrackingLog -EventID "DELIVER" -Start "xx/xx/xxxx 12:00:00 AM" -End "xx/xx/xxxx 11:59:00 PM" -ResultSize unlimited |
    where {$Senders -contains $_.Sender} |
    select timestamp, eventid, messagesubject, sender, {$_.recipients}, totalbytes |
    export-csv c:\message\sendtrak.csv
    Note - I'm assuming what you're trying to report on is the emails sent by the people in the list.  It's impossible to tell if the list is the senders, the recipients, or both,  from the information provided.

    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Monday, February 18, 2013 2:50 PM
  • Yes trying to find emails sent and received by users in the list. I will give your suggestion a try. Also is there a way to make the date range days before the date run instead of finite dates, it would be easier to schedule that way.

    Thanks,

    Bill

    Monday, February 18, 2013 5:20 PM
  • The example I gave will only find emails sent by people in the list, and delivered internally.  

    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Monday, February 18, 2013 7:05 PM
  • I'd use this:

    http://gallery.technet.microsoft.com/exchange/bb94b422-eb9e-4c53-a454-f7da6ddfb5d6

    And select out the addresses for the users in the list when it's done.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Monday, February 18, 2013 7:37 PM