PowerTip: Find List of Users in Active Directory

Doctor Scripto

Summary: Use the Filter parameter in the Active Directory module.

Hey, Scripting Guy! Question I was playing with the Active Directory cmdlets and noticed that they seem to need the Distinguished Name.
           Is there any way to find users instead of supplying this very explicit object each time?

Hey, Scripting Guy! Answer Use the –Filter parameter to pull the information. For example, to find all users with the last name Smith,
           specify the Surname attribute with the –Filter parameter:

GET-ADUser –filter 'Surname –eq "Smith"' 

0 comments

Discussion is closed.

Feedback usabilla icon