Windows Server

Save queries in Windows Server 2003's Active Directory Users and Computers tool

Windows Server 2003 administration can't live without the Active Directory Users and Computers tool. Here's a quick look at the saved queries portion of the tool, which allows you to save and reuse lookups for different Active Directory (AD) objects.

Windows Server 2003 administrators can't live without the Active Directory Users and Computers tool. Here's a quick look at the saved queries portion of the tool, which allows you to save and reuse lookups for different Active Directory (AD) objects. The ability to reuse queries can save time and speed up the process of locating objects within your AD environment.

The Active Directory Users and Computers tool is included in the AD implementation used by Windows Server 2003. The following steps will help in saving AD queries:

  1. Open Active Directory Users And Computers.
  2. Right-click the Saved Queries folder in the left pane of the window.
  3. Select New and choose Query.
  4. Enter a name and description for your saved query. (The description is optional, but it can help you remember what the query is looking for if you ever need to revisit the query definition.)
  5. Click the Define Query button, which will open the Common Queries window. (You'll find that Microsoft has created a few predefined queries to assist you in finding certain objects. For this example, we will create our own query to find any users whose last names are similar to Miller.)
  6. In the Find box, select Users, Contacts, And Groups.
  7. Select the Advanced tab.
  8. Click the Field button, select User, and then select Last Name.
  9. For an operator in the center list box, select Is Like.
  10. Enter Miller or Mille* in the final text box on the row and click Add.
  11. Click OK in the Define Query window to return to the New Query window. (In the New Query window, you can also choose to include sub containers. Selecting this will search in any child organizational units or container objects for things that meet the conditions of the query you created.)
  12. Click OK to close the New Query window and return to Active Directory Users And Computers.

Your query will appear saved beneath Saved Queries in the left pane of the console. To execute the query, right-click it and choose Refresh. If you select the query without refreshing, the results from the last time you ran the query will appear.

This method does not circumvent or remove the need for Active Directory Users and Computers, but it may make it a little more useful. Remember that you can create truly custom queries for all of the AD object properties in your environment.

Miss a Windows Server 2003 tip?

Check out the Windows Server 2003 archive, and catch up on the most recent tips from this newsletter.

Stay on top of the latest Windows Server 2003 tips and tricks with our free Windows Server 2003 newsletter, delivered each Wednesday. Automatically sign up today!

About

Derek Schauland has been tinkering with Windows systems since 1997. He has supported Windows NT 4, worked phone support for an ISP, and is currently the IT Manager for a manufacturing company in Wisconsin.

6 comments
yogi bhatt
yogi bhatt

how is configure AD server 2003 in total security with of our local network connection?

umss_vishwakarma
umss_vishwakarma

Suppose that i hav 2 user ABC and XYZ now i want to restrict ABC user to use the "USB Storage" and "DVD rom". the other user can do any thing... how do i do this. pls SEND me answer to this e-mail ID "umss_vishwakarma@yahoo.co.in"

sbrooks15
sbrooks15

Is it possible to query AD using Excel - Data - Get External Data Function? I use saved queries, but have not found a way to bring it into Excel. Any thoughts?

senghak
senghak

i think this is useful for administrator as me. thanks editor.

Brandon_Forest
Brandon_Forest

As a DBA I've had to configure Kerberos in our environment. To set the Service Principle Name (SPN) I use the ADSI Edit tool. The SPN setting is one of dozens listed, and I just wonder if anyone has a good reference that I can peruse to begin to understand some of the other settings. Brandon_Forest@sbcglobal.net

Editor's Picks