Exchange 2007- Powershell Query

I would like to create a query showing users Title and name. The following works:

Get-User -Filter { Department -like '*IT' }

But it doesn't show the title of the user.

So i created this query but it doesn't work:

"Get-User -Filter { Department -like '*IT' } Format-List Name, Title"

[PS] C:\Windows\System32>Get-User -Filter { Department -like '*IT' } Format-List
 Name, Title
Get-User : A parameter cannot be found that matches parameter name 'Format-List
At line:1 char:9
+ Get-User  <<<< -Filter { Department -like '*IT' } Format-List Name, Title

Any ideas? Thanks in advanced
Who is Participating?

You're missing a pipe character.

If you change your command to

Get-User -Filter { Department -like '*IT' } | Format-List Name, Title should do exactly as you are expecting it to.

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.