Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Is there a way to pull number of e-mails sent\received from a particular Ad forest in samedomain?

$
0
0

Good day everyone,

I have a bit of a problem hopefully someone can help me here. I have a domain ABC.com with several Ad forests.

Is there a powershell script that can distinguish users from a particular AD forest within the same domain and give me the amount of e-mails sent received from those users?

I tried to use the following script but obviously gives me all users in my domain. I need to limit it to a particular Ad forest within our doman. Thanks again

(get-transportserver hub01 |get-messagetrackinglog -ResultSize unlimited -Start $(get-date).adddays(-30) -End $(get-date) | where {$_.Sender -like "*@abc.com" -AND $_.EventID -eq "DELIVER"}).count


Viewing all articles
Browse latest Browse all 10624

Trending Articles