Number of E-mails Sent and Received by one User
Int] $intSent = $intRec = 0
Get-TransportServer | Get-MessageTrackingLog -ResultSize Unlimited -Start “10/01/2012” -End “11/01/2012” -Sender "user@domain.com" -EventID RECEIVE | ? {$_.Source -eq "STOREDRIVER"} | ForEach { $intSent++ }
Get-TransportServer | Get-MessageTrackingLog -ResultSize Unlimited -Start “10/01/2012” -End “11/01/2012” -Recipients "user@domain.com" -EventID DELIVER | ForEach { $intRec++ }
Write-Host "E-mails sent: ", $intSent
Write-Host "E-mails received:", $intRec
No comments:
Post a Comment