Answered Exchange 2010 S2 Get-MessageTrackingLog

  • Monday, January 28, 2013 7:55 PM
     
     

    Hi!

    I´d like to get the qantity of e-mails sent to each Recipient using the following filter:

    Get-MessageTrackingLog -MessageSubject "Undeliverable" -EventID DSN -ResultSize Unlimited | ft Recipients

    example:

    mail1@domain.com       1754

    mail2@domein.com        456

    (...)

    Is it possible to script and get the results?

    I have been doing a excel formula that counts, but it´s too long and my compter get feezing, making it inviable.

    Thanks fo helping!


    Fabio Martins MCDST/MCSA Brasil!!!

All Replies

  • Monday, January 28, 2013 9:09 PM
     
     Answered

    Hi,

    Did you check this site.. 

    http://exchangeserverpro.com/exchange-2010-message-tracking-log-search-powershell


    Kottees : My Blog : Please mark it as an answer if it really helps you.

  • Tuesday, January 29, 2013 3:00 PM
     
     Answered Has Code

    Hi,

    Did you check this site.. 

    http://exchangeserverpro.com/exchange-2010-message-tracking-log-search-powershell


    Kottees : My Blog : Please mark it as an answer if it really helps you.

    Based on that article, I did what I want with the following script:

    $data = Get-Date -format d $datai = $data+" 00:00:01AM" $dataf = $data+" 11:59:59PM"

    Get-TransportServer | Where {$_.Name -like "ABCD-*"} | Get-MessageTrackingLog -MessageSubject "Undeliverable" -EventID DSN -Sender postmaster@mydomain.com -ResultSize Unlimited -Start $datai -End $dataf | Group-Object -Property Recipients | Select-Object values,count | sort count -desc | select -first 10 | ft -auto

    Where ABCD is part of the name of the servers, representing the site wich the servers are located

    Thankyou very much!


    Fabio Martins MCDST/MCSA Brasil!!!

  • Wednesday, January 30, 2013 1:23 AM
    Moderator
     
     

    Hi

    Thanks for sharing

    Cheers


    Zi Feng
    TechNet Community Support