Powershell – Exchange 2013: Weekly Message Count

emailexchange-2013powershell

I have a manager needing to check on an employees sent and received message count as the employee is stating they are getting too much mail compared to others in the company.

I've been checking online for a script or free tool that can just show me the account in question message count of received and sent but nothing seems to be working correctly and since I'm not very good at scripting I can't seem to make changes to help.

The closest I've found was:

Get-MessageTrackingLog -Recipient me@domain.com -Start "02/22/2015 12:00:00 AM" -End "02/28/2015 11:59:59 PM" | Group-Object -Property:EventId | Sort-Object Count -Desc | Select Name,Count | export-csv C:\user-mail-count.csv

But when I run it against my account to test it doesn't seems to match up what my account shows as it says 207 under send when I sent 46 message out in the time frame.

Any help on either a edit or new script or a free tool that can help would be greatly appreciated.

Best Answer

I've been asked something vaguely similar, and have

Get-MessageTrackingLog -Sender user@example.com -EventID "send" -start '3/1/15' -end '3/5/15' -resultsize unlimited | select-object sender | Group-Object pattern | select count

The receive would be:

Get-MessageTrackingLog -Recipients user@example.com -EventID "receive" -start '3/1/15' -end '3/5/15' -resultsize unlimited | select-object sender | Group-Object pattern | select count

I hope that helps.