Active Directory Users and Computers Saved Queries

Wow, check out these great ADUC saved queries from   Ron Crumbaker at

Does anyone use the Saved Queries with in the ADUC?

I do, and I love them.

Here are some that might help you out.

Just Right Click on Saved Queries and Choose New and then Query.

Name the Query accordingly and then click on Define Query…

Then Find the Custom Search and click on the Advanced tab.

Paste each of these in the <add criteria from above to this list> area and then click OK.

Locked Out Users


Dial In Access


Disabled User Accounts


No Expiring Accounts


Active Accounts


Hidden Mailboxes


Windows 2000 SP4

(&(&(&(objectCategory=Computer)(operatingSystem=Windows 2000 Professional)(operatingSystemServicePack=Service Pack 4))))

Windows XP SP3

(&(&(&(&(&(&(&(objectCategory=Computer)(operatingSystem=Windows XP Professional)(operatingSystemServicePack=Service Pack 3))))))))

Vista SP1 Machines

(&(&(&(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Windows Vista*)(operatingSystemServicePack=Service Pack 1)))))

All Workstations


2003 Servers Non-DCs

(&(&(&(samAccountType=805306369)(!(primaryGroupId=516)))(objectCategory=computer)(operatingSystem=Windows Server 2003*)))

2003 Servers – DCs

(&(&(primaryGroupID=516)(objectCategory=computer)(operatingSystem=Windows Server 2003*)))

Server 2008

(&(&(&(&(samAccountType=805306369)(!(primaryGroupId=516)))(objectCategory=computer)(operatingSystem=Windows Server 2008*))))

Depending on how you have your AD Structure, you might need to edit each query and point it to the OU you desire…but hopefully this will get you started.

As I find a need to create more queries, I will post them to my blog.  Enjoy!

Active Directory Users and Computers Saved Queries
Thu, 07 Aug 2008 19:39:07 GMT


6 thoughts on “Active Directory Users and Computers Saved Queries

  1. 2008 SP1 broke this one due to addition of a copyright symbol. This will fix it (note the added asterix)

    (&(&(&(&(samAccountType=805306369)(!(primaryGroupId=516)))(objectCategory=computer)(operatingSystem=Windows Server 2008*))))

    (&(&(&(&(&(samAccountType=805306369)(!(primaryGroupId=516)))(objectCategory=computer)(operatingSystem=Windows Server* 2008*)))))

  2. 2008 Servers – DCs

    (&(&(&(&(primaryGroupID=516)(objectCategory=computer)(operatingSystem=Windows Server* 2008*)))))

  3. Disabled Computers


  4. Enabled computers


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: