Link to home
Start Free TrialLog in
Avatar of Gilesmp
GilesmpFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exchange 2010 report powershell script - no. of emails sent to distribution group

Hi,

Wondering if anyone has a script that can be run on Exchange 2010 logs to show the following:

No. of emails sent to a specific distribution group
Between two dates
Showing number of original emails only (i.e. omits replies/forwards of same email thread)

Thanks in advance,
Giles
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Get-MessageTrackingLogs - Recipient "Email address of DL" - StartDate "****" -EndDate "***" > C:\data.csv

- Rancy
ASKER CERTIFIED SOLUTION
Avatar of page1985
page1985
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To not show replies/forwards, you may want to insert something like this, before Export-csv :
where {MessageSubject -ne "Re:" -or MessageSubject -ne "Fw:"} |
Avatar of Gilesmp

ASKER

Hi Page,

Thanks for this.  It does exactly what I want.  As this brings in the email subject and I have to sort the report anyway I just removed FW's and RE's.

Many thanks,
Giles
Avatar of Gilesmp

ASKER

Hi Akulsh,

Thanks but that addition throws up an error.  However, as mentioned above, I have addressed the forwards and replies.

Many thanks,
Giles
Akulsh almost had it:

|Where {$_.MessageSubject -notlike "Re:*" -and $_.MessageSubject -notlike "Fw:*"}

Glad I could help.