• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1280
  • Last Modified:

PowerShell / quest cmdlets to export a list of users with last name "LEE" and SAM account

PowerShell / quest cmdlets to export a list of users with last name "LEE" and SAM account from the root of a domain.
0
mjm21
Asked:
mjm21
1 Solution
 
RickSheikhCommented:
get-qaduser -searchroot rootdomain.local -sl 0 | where{$_.lastname -like "lee"}
0
 
KenMcFCommented:
You can use a LDAP Filter liek this

get-qaduser -ldapfilter "(sn=LEE)" | Select samaccountname
0
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.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now