You can create and run queries to locate objects in an SMS site that match your query criteria. These objects include such items as specific types of computers or user groups. Queries can return most types of SMS objects, including sites, collections, packages, and saved queries themselves. However, queries are most useful for extracting information related to resource discovery, inventory data, and status messages.
When you create a query, you must specify a minimum of two parameters: where to search, and what to search for. For example, to find out the amount of hard disk space available on all personal computers in an SMS site, you can create a query to search the System Resource object type and search for available hard disk space.
After you create an initial query, you can specify additional query criteria. For example, you can specify that the query results include only personal computers with more than 100 MB of available hard disk space. You can also modify how results are displayed so that you can view the results in an order that is meaningful to you. For example, you can specify that the results be ordered by the amount of available hard disk space in either ascending or descending order.
When you create a query, it is stored by SMS and displayed in the SMS Administrator console under Queries. From here you can create, run, view, modify, and delete queries.
When a query is run, SMS searches the SMS site database for objects that match the query criteria. The results of the query appear in the details pane of the SMS Administrator console.
Note Queries targeting SMS status messages are best viewed using Status Message Viewer.
Modify How Query Results Are Displayed
About Query Elements
About Object Types
About Attributes and Attribute Classes
About Criterion Types
About Logical Operators
About Relational Operators
About Group Parenthesis
About Attribute Class Joins
Using Queries to Locate Resources Overview