I'm trying to come up with a way to get a decent count of mail sent/received from a text file of email addresses. What I would like to do is get-content from a text file, and then use each line of that text file in the location of the -sender or -recipient switch.
Sort of like "get-messagetrackinglog -server myserver -resultsize Unlimited -start $myvariable -sender (one line at a time)"
Of course doing something like this:
$m = get-content c:\mytextfileofemailaddresses.txt
get-messagetrackinglog -server myserver -resultsize Unlimited -start $myvariable -sender $m
uses the entire block of text for the -sender switch. I'm not sure if this is even possible or perhaps there is a better way to go about it, any info is appreciated. I will actually be storing the trackinglog results as it's own variable since they want count not content, and then storing the -recipient results in a variable as well. So what they will see is something like:
$1.count
$2.count
$1.count + $2.count
Thanks.