Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 200972 - Last Review: February 27, 2007 - Revision: 3.3
SMS: Custom Collection Examples
This article was previously published under Q200972
In Microsoft Systems Management Server,
you can build collections based on the resource class. This article describes
how to create two sample queries to:
- Find domain controllers
- Find all computers in a particular subnet
Steps to Create a Query to Find All Domain Controllers at a Site
NOTE: This procedure assumes the domain controller is a client and
hardware inventory is turned on.
- In the SMS Administrator console, right-click Queries, point to New, and click Query on the shortcut menu.
- Type TEST1 for the Name.
- In the Object Type box, enter System Resource if it is not already entered.
- Click Edit Query Statement, then click the icon with the yellow rays.
- Click the Select button on the Result Properties page.
- Select Computer System in the Attribute class box and select Name in the Attribute box. Then click OK.
- On the Result Properties page, select Ascending in the Sort box. Click OK.
- Click the icon with the yellow rays. Repeat steps 5 through
7 but replace Name with Roles in the Attribute box (step 6) and replace Ascending with Unsorted in the Sort box (step 7).
- Select the Criteria tab under TEST1 Query Statement Properties. Click the icon with the yellow rays. On the Criterion Properties page, enter the following:
- Criterion Type: simple value
- Where: Choose Select...
- Attribute class: Computer System
- Attribute: Roles
- Operator: is like
- Value: %Domain_Controller%
Click OK.
- Click OK. On the Query Properties page, limit the collection to All Windows NT Server Systems.
- Click OK to save the query.
Steps to Create a Query to Find All Computers in a Subnet
- In the SMS Administrator console, right-click the Queries node, point to New, and click Query on the shortcut menu.
- Type TEST2 in the Name box.
- In the Object Type box, enter System Resource if it is not already entered.
- Click Edit Query Statement and then click the icon with the yellow rays.
- On the Result Properties page, click the Select button.
- Select System Resource in the Attribute class box and select Name in the Attribute box. Then click OK.
- On the Result Properties page, select Ascending in the Sort box. Click OK.
- Click the icon with the yellow rays. Repeat steps 5 through
7 but replace Name with IP Addresses in the Attribute box (step 6) and replace Ascending with Unsorted in the Sort box (step 7).
- Repeat step 8 but replace Name with IP Subnets.
- Select the Criteria tab under TEST2 Query Statement Properties. Click the icon with the yellow rays. On the Criterion Properties page, select the following:
- Criterion Type: simple value
- Where: Choose Select...
- Attribute class: System Resources
- Attribute: IP Subnets
- Operator: is equal to
- Value: click the Value button and select the subnet you want.
Click OK
- Click OK. On the TEST2 Query Properties page, select Not Collection Limited (or choose a selection that will further limit the search, such
as Win98 on subnet x).
- Click OK to save the query.
Collections can be created based on the queries noted earlier:
Collections/New <enter name>
/Membership Rules/Query Rule properties/Name (TEST1 or TEST2 in the example above).
APPLIES TO
- Microsoft Systems Management Server 2003
- Microsoft Systems Management Server 2.0 Standard Edition
| kbcollections kbinfo kbquery KB200972 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate