Scotch Tech
asked on
Exchange 2013 - Need script to report on the amount of emails going through my exchange
Exchange 2013 script to get the quantity of emails sent or received?
ASKER
any way to tell only the internal to internal emails?
You can run the following to get internal results count only.
(get-messagetrackinglog -ResultSize unlimited -Start "09/01/2018" -End "10/1/2018" | where {$_.Sender -like "*@timspcsolutions.com" -and $_.Recipients -like "*@timspcsolutions.com" -and $_.Source -eq "STOREDRIVER"}).count
Be sure to keep the parenthesis.
(get-messagetrackinglog -ResultSize unlimited -Start "09/01/2018" -End "10/1/2018" | where {$_.Sender -like "*@timspcsolutions.com" -and $_.Recipients -like "*@timspcsolutions.com" -and $_.Source -eq "STOREDRIVER"}).count
Be sure to keep the parenthesis.
ASKER
thanks. Before I saw this i used:
Get-TransportService | Get-MessageTrackingLog -ResultSize unlimited | ? {$_.EventId -eq DELIVER} | measure-object
It came back with a large number. I assume it worked, but don't know how accurate using this eventid is.
Get-TransportService | Get-MessageTrackingLog -ResultSize unlimited | ? {$_.EventId -eq DELIVER} | measure-object
It came back with a large number. I assume it worked, but don't know how accurate using this eventid is.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://gallery.technet.microsoft.com/office/Count-sent-and-recceived-f9c66cf7