Understanding SMS Queries

SMS queries are similar to queries you might use with Microsoft SQL Server(tm) or other database management systems, but SMS queries are defined in the WMI Query Language (WQL). You do not need to know WQL to build queries, but it is helpful if you are building more complex queries.

In the SMS Administrator console, you can create queries by using the SMS Query Builder. SMS Query Builder is a user interface designed specifically to help you search for the attributes of objects in the SMS site database and use those to build a query.

To launch the SMS Query Builder

  1. In the SMS Administrator console, navigate to Queries.

  2. Right-click Queries, point to New, and then click Query.

  3. In the Query Properties dialog box, click Edit Query Statement to launch the SMS Query Builder.

    The Query Statement Properties dialog box opens.

The Query Statement Properties dialog box is one of the dialog boxes that comprise the SMS Query Builder. The Query Statement Properties dialog box opens in the Query Design view, from which you can use the tabs and command buttons to build a query. You can also build queries by using WQL in the Query Language view by clicking Show Query Language.

SMS Query Builder has its own specific terminology and requirements. To understand and use the SMS Query Builder, you must become familiar with the concepts described in the next four sections:

  • SMS Object Types

  • Required SMS Query Elements

  • Optional SMS Query Elements

  • WMI Query Language

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.