get-messagetracking and importing a csv

suelizy
suelizy used Ask the Experts™
on
I need to get a list of how many messages a specific group of users sent during a specific time frame.  I could manually do this with message tracking one user at a time, but no thanks.  I suspect that I could do it with message tracking using a .csv file but I am having trouble finding how to do this.  Can anyone help me out.  

I basically want to run this syntax for 50 specific users.  get-messagetrackinglog -EventID "SEND" -Start "7/1/2010 9:00:00 AM" -End "7/1/2010 6:00:00 PM"

Thanks!

Susan
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
PowerShell Developer
Top Expert 2010
Commented:

Hey Susan,

You've got the users in a CSV file at the moment?

If so, it goes like this:


Import-CSV "YourCSVFile.csv" | ForEach-Object {
  Get-MessageTrackingLog -EventID "SEND" -Start "7/1/2010 9:00:00 AM" `
    -End "7/1/2010 6:00:00 PM" -Sender $_.Email
}


In this example I assume the CSV file looks like this:

Email
firstsender@domain.com
secondserver@domain.com

That Email column is what it's referring to with the $_.Email value.

Is that what you're after?

HTH

Chris

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial