Get-ActiveSyncDeviceStatistics against a list of users

Hi I have a list of AD user name in C:\temp\users.txt

I want to be able to run the Get-ActiveSyncDeviceStatistics against that list.

Something like Get-Content C:\temp\users.txt | Get-ActiveSyncDeviceStatistics

Can someone please send me the correct syntax.

Who is Participating?
Will SzymkowskiSenior Solution ArchitectCommented:
Use the following PS script below...

$UserList = get-content "c:\temp\users.txt"
$UserList | % {Get-ActiveSyncDeviceStatistics -Mailbox $_.}

VirastaRUC Tech Consultant Commented:

Check whether the treasure you are looking for is hidden in this chest..

trying to get list of activesync devices EXCLUDING those in a list

Hope that helps :)
ECS-ITUKAuthor Commented:
Works great thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.