locked
GET RECEIVED/NUMBER EMAIL ON BUNCH OF DISTRIBUTION GROUPS RRS feed

  • Question

  • Hello,

    I use Exchange 2007 and I would need to check whether some DistributionGroup are receiving email on oue main domain (*@company.com).

    I have more than 900 Distribution Groups and I though about using the identity or SamAccountName and check whether some mails have been received.

    Consulting only one Dstribution group is juste fine:
    get-messagetrackinglog -resultsize unlimited -Start "10/03/2012 20:46:00" -End "10/04/2012 20:56:00" -EventID "RECEIVE" | where {$_.sender -like "*@company.com"} | ft timestamps,sender, recipients,messagesubject

    --> My question are:

    1) Is there any way to get that result for multiple distribution group in a nice format 

    2) If the above point is not possible or even if it is, Can I count the number of email recieved per distribution group?

    Many thanks in advance and let me know if you need further information.

    Graig
    Thursday, April 19, 2012 9:02 PM

All replies

  • Yes.

    [PS] C:\admin>get-messagetrackinglog -resultsize unlimited -Start "04/19/2012 00:46:00" -End "04/19/2012 20:56:00" -Even
    tID expand | where {$_.sender -like *@company.com} | ft timestamps,sender, RelatedRecipientAddress ,messagesubject -Autosize

     


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com

    Thursday, April 19, 2012 9:31 PM
  • Thanks James but the trick here is that I need to track only distribution lists and not the entiere items. In fact, my goals here is to know whether the distribution lists are used or not. As I have more than 900 lists I thought It would be useful to have a nice script to track a bunch of DGs even a small amount like 10 lists.

    I'm not good enought to create script with variable but I believe it would be the way to get what I need.

    Thanks,

    Graig

    Friday, April 20, 2012 6:14 AM
  • Yes that only gets DL's using the relatedrecipientsaddress did you run it? Use the guidance below to determine whether DLs are being used.

    Are Distribution Groups really being used?
    http://exchangepedia.com/blog/2009/01/are-distribution-groups-really-being.html


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com

    • Proposed as answer by Castinlu Monday, April 23, 2012 7:45 AM
    • Marked as answer by Castinlu Tuesday, May 1, 2012 5:56 AM
    • Unmarked as answer by Castinlu Friday, May 4, 2012 2:12 AM
    Friday, April 20, 2012 2:20 PM
  • I have to say that the article and results are nice!

    However, I need to check more than 900 distribution groups up. I do not know how to write a script that would allow me to check my distrubution lists (one by one ) and indicate me whether mails have been received or not during the last past 4 weeks.

    Example of whaht I am looking forward:

    Distribution.list1@company.com : 1
    Distribution.list2@company.com : 18
    Distribution.list3@company.com : 0
    Distribution.list4@company.com : 0
    Distribution.list5@company.com : 50
    Distribution.list6@company.com : 32
    Distribution.list7@company.com : 0
    Distribution.list8@company.com : 89
    Distribution.list9@company.com : 35

    Thanks,
    Graig
    Monday, April 23, 2012 3:16 PM
  • In fact that command:

    get-messagetrackinglog -Recipients:distributiongroups@company.com -start "23/03/2012 16:53:00" -End "23/04/2012 17:03:00" -eventid "receive" -resultsize 9999999 | measure-object

    Which gives me:

    Count    : 6
    Average  :
    Sum      :
    Maximum  :
    Minimum  :
    Property :

    Tells me more about what I need to know.. But still how would I get a maybe nice CSV file with DG : COUNT (As the above example)??

    Graig

    Monday, April 23, 2012 3:18 PM
  • hi,

    Run this cmd:Get-MessageTrackingLog -Start 2/1/year -EventId Expand | group-object RelatedRecipientAddress | ft Name,@{Name=' '; Expression={[String]::join(";",("    :"))}},Count -Autosize | export-csv c:\XXXX.csv 

    set the value year, such as 1907. I think you can get the result like you say.

    Example of whaht I am looking forward:

    Distribution.list1@company.com : 1
    Distribution.list2@company.com : 18
    Distribution.list3@company.com : 0
    Distribution.list4@company.com : 0
    Distribution.list5@company.com : 50
    Distribution.list6@company.com : 32
    Distribution.list7@company.com : 0
    Distribution.list8@company.com : 89
    Distribution.list9@company.com : 35

    hope can help you

    thanks


    CastinLu

    TechNet Community Support

    • Marked as answer by Castinlu Tuesday, May 1, 2012 5:56 AM
    • Unmarked as answer by Castinlu Friday, May 4, 2012 2:12 AM
    Wednesday, April 25, 2012 9:11 AM
  • Thank you. I am getting that error message:

    Format-Table : Illegal key Name

    At line:1 char:99
    + Get-MessageTrackingLog -Start 2/1/1907 -EventId Expand | group-object RelatedRecipientAddress | ft  <<<< Name,@{Name=' '; Expression={[String]::join(";",("    :"))}},C
    ount -Autosize | export-csv c:\Test.csv

    Friday, May 4, 2012 7:24 AM
  • Anyone can help me out and tell me how I could get the number of emails received onto a bunch of distribution groups?
    Tuesday, May 22, 2012 10:35 AM
  • Just do

    [PS] C:\Windows\system32>Get-MessageTrackingLog -Start 5/21/2012 -EventId Expand | group-object RelatedRecipientAddress
    | ft Name,Count -Autosize

     


    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com

    Tuesday, May 22, 2012 3:14 PM
  • Thanks James,

    so I ran the command: Get-MessageTrackingLog -ResultSize unlimited -Start 21/05/2012 -EventId Expand | group-object RelatedRecipientAddress | ft Name,Count -Autosize

    It then counted the number of mails per DG that has received mails on the 21th of may 2012 (as far as I understood). 

    I tried with -Start 21/05/2012 -End 23/05/2012 to give me a better out look. and It seems to give me exactly what I needed except one thing: The distribution groups that do not receive emails are not present on that list. Does it exist any command to show the DG taht receive 0 mail?

    Many thanks,

    Graig

    Monday, June 18, 2012 9:05 AM
  • On Mon, 18 Jun 2012 09:05:35 +0000, Graiggoriz wrote:
     
    >
    >
    >Thanks James,
    >
    >so I ran the command: Get-MessageTrackingLog -ResultSize unlimited -Start 21/05/2012 -EventId Expand | group-object RelatedRecipientAddress | ft Name,Count -Autosize
    >
    >It then counted the number of mails per DG that has received mails on the 21th of may 2012 (as far as I understood).
    >
    >I tried with -Start 21/05/2012 -End 23/05/2012 to give me a better out look. and It seems to give me exactly what I needed except one thing: The distribution groups that do not receive emails are not present on that list. Does it exist any command to show the DG taht receive 0 mail?
     
    You're looking at the message tracking log. If there are no messages
    sent to a group the group isn't going to be found in those log files.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Monday, June 18, 2012 10:01 PM