MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Powershell cmdlet to track emails send to one specific email id/mailbox/DL

This is not a new cmdlet but I customized it a bit so that we get some “presentable” output

Scenario:

We need to track all emails send to a mailbox/mail enabled DL with the name – team@msexchangeguru.com

Condition 1 – Get all failed/undeliverable emails:

Get-Messagetrackinglog -Recipients: team@msexchangeguru.com -EventID “FAIL” -Start “5/4/2011 9:00:00 AM” -End “5/10/2011 5:00:00 PM” |ft Timestamp, Source, Sender, Recipients, MessageSubject >>C:\output.txt

Condition 1 – Get all success emails

Get-Messagetrackinglog -Recipients: team@msexchangeguru.com -EventID “RECEIVE” -Start “5/4/2011 9:00:00 AM” -End “5/10/2011 5:00:00 PM” |ft Timestamp, Source, Sender, Recipients, MessageSubject >>C:\output.txt

This will give you the output in the form:

Timestamp Source Sender Recipients MessageSubject

Source “SMTP” means it’s an external email and “STOREDRIVER” means processed internally

Again remember to edit the properties of the powershell window to make it 400×300.

Ratish Nair

MVP Exchange

Team@ MSExchangeGuru.com

3 Responses to “Powershell cmdlet to track emails send to one specific email id/mailbox/DL”

  1. Gibs Says:

    You are a life saver my friend. Great script…

  2. mike f Says:

    not working for me, did i miss something??

    PS C:\Windows\system32> Get-Messagetrackinglog -Recipients: User.name@mydomainname.com -EventID “RECEIVE” -Start ” 2/1/2014 9:00:00 AM” -End ” 2/05/2014
    5:00:00 PM” |ft Timestamp, Source, Sender, Recipients, MessageSubject >>C:\output.txt

  3. mehdi Says:

    that was very useful.Thanks.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Categories

Archives