To change the query scope in Windows Server and search in different domains or specific organizational units, you can utilize the Saved Queries feature. This feature allows you to create custom queries that can be saved and reused for searching specific areas of your Active Directory environment. By modifying the query scope, you can narrow down the search results to specific domains or organizational units, providing a more targeted and efficient search experience.
To begin, open the Active Directory Users and Computers snap-in on your Windows Server. This snap-in is a Microsoft Management Console (MMC) that provides a graphical user interface for managing Active Directory. Once opened, follow these steps to modify the query scope:
1. Right-click on the "Saved Queries" folder in the left pane of the Active Directory Users and Computers window.
2. Select "New" and then choose "Query" from the context menu. This will open the "New Query" dialog box.
3. In the "Name" field, enter a descriptive name for your query. This name will be displayed in the Saved Queries folder.
4. Click on the "Define Query" button to open the "Query Builder" dialog box.
5. In the "Find" drop-down menu, select the type of object you want to search for, such as "Users," "Groups," or "Computers."
6. In the "In" drop-down menu, choose the location where you want to search. By default, the search scope is set to the entire domain.
7. To search in a different domain, select the "Entire Directory" option and click on the "Browse" button next to it. This will allow you to select a different domain from the list.
8. To search in a specific organizational unit, select the "Selected Containers" option and click on the "Browse" button next to it. This will open the "Select Containers" dialog box, where you can choose the desired organizational unit(s).
9. Once you have selected the desired location, click on the "OK" button to close the "Select Containers" dialog box.
10. In the "Query Builder" dialog box, you can further refine your query by adding additional criteria using the various tabs available, such as "General," "Advanced," "Exchange," etc.
11. After defining your query, click on the "OK" button to close the "Query Builder" dialog box.
12. Finally, click on the "OK" button in the "New Query" dialog box to save your query.
Your newly created query will now be displayed in the Saved Queries folder, and you can simply double-click on it to execute the search within the specified query scope. The search results will be displayed in the right pane of the Active Directory Users and Computers window, providing you with the desired information from the selected domains or organizational units.
For example, let's say you want to search for all users in the "Sales" organizational unit within the "example.com" domain. You would create a new query, name it "Sales Users," select the "Users" object type, choose the "Selected Containers" option, and then browse to and select the "Sales" organizational unit within the "example.com" domain. This query would then retrieve all user objects within the specified scope.
By utilizing the Saved Queries feature in Windows Server's Active Directory Users and Computers snap-in, you can easily change the query scope and search in different domains or specific organizational units. This allows for more targeted searches and efficient management of your Active Directory environment.
Other recent questions and answers regarding EITC/IS/WSA Windows Server Administration:
- Can an Active Directory role to be added require different roles to be added as well?
- How do you create a reverse lookup zone in Windows Server, and what specific information is required for an IPv4 network configuration?
- Why is it recommended to select Secure Dynamic Updates when configuring a DNS zone, and what are the risks associated with non-secure updates?
- What are the options for replication scope when storing a DNS zone in Active Directory, and what does each option entail?
- When creating a new DNS Zone, what are the differences between Primary, Secondary, and Stub Zones?
- What are the steps to access the DNS management console in Windows Server?
- What are the scenarios where port forwarding configuration might be necessary for virtual machines connected to a NAT Network in VirtualBox?
- Why is it important to ensure that DHCP remains enabled when configuring a virtual network in VirtualBox?
- What is the significance of the CIDR notation when setting the Network CIDR for a virtual network, and how does it affect the IP address range?
- How can you create a new NAT Network in the Network tab of the VirtualBox Preferences window?
View more questions and answers in EITC/IS/WSA Windows Server Administration

