Extended WMI Query Language

System Center

Microsoft® Systems Management Server (SMS) supports a superset of the Windows Management Instrumentation (WMI) Query Language (WQL) known as Extended WQL. Both WQL and Extended WQL are retrieval-only languages used to create queries. Neither language can be used to create, modify, or delete classes or instances.

WQL and Extended WQL are based on the American National Standards Institute Structured Query Language (ANSI SQL) standard. However, they differ from standard SQL in that they retrieve from classes rather than tables and return instances rather than rows.

Extended WQL supports elements from two versions of ANSI SQL:

  • ANSI-92, the recommended version for most operations.
  • ANSI-89, which is primarily used only for JOIN operations by Open Database Connectivity (ODBC) applications requiring the services of the WMI ODBC Adapter.

Extended WQL includes a much broader range of operations than WQL. The following list shows you the SELECT clauses that Extended WQL supports:

  • JOIN
  • UPPER, LOWER, and DATEPART functions

Because Extended WQL is now (with SMS Service Pack 2 and later) fully case-insensitive, the UPPER and LOWER functions are not useful. Extended WQL supports the standard comparison operators, including LIKE and IN, and also subqueries.

Note  The SMS Provider does not support querying on system properties. System properties are those preceded by a double underscore prefix, for example __path.

Also, association queries are limited to the WQL syntax and the WHERE clause can only contain OR cases.