top of page
Search

How to query Active Directory Users

Updated: Mar 17, 2019

Here is our task: Create a few Active Directory User queries.

-Filter all users that are employees

-Filter all users that report to Abigail Lowe (alowe)

-Filter all disabled users

-Filter all users based in the Japan office

-Filter all users with VP in title


Let's start by querying all of our Active Directory users in your staging environment. The below command we are limiting our search to our user OU, and we are grabbing each users properties.

Lets start off by taking a look at one of our users properties. As you can see the left shows the property and to the right shows the value for that user.



 

Query 1: Filter all users that are employees

Looking at the users properties and values we can use Description or employeeType. The commands should look like below.



 

Query 2: Filter all users that report to Abigail Lowe (alowe)

Looking at the users properties and values we can use manager or directReports



 

Query 3: Filter all disabled users

Looking at the users properties and values we are looking for all accounts with the property Enabled set to False



 

Query 4: Filter all users based in the Japan office

Looking at the users properties and values we are looking for all accounts with the property physicalDeliveryOfficeName set to Japan



 

Query 5: Filter all users with VP in title

Looking at the users properties and values we are looking for all accounts with the property title with VP in it.



 

11 views0 comments

Recent Posts

See All
bottom of page