WMI Query Language (WQL)
The WMI Query Language (WQL) is designed to perform queries against the CIM repository to retrieve WMI information. WQL is a subset of ANSI SQL with minor semantic changes to support WMI. Therefore,it is very straightforward to write WQL queries.WQL queries can be divided into three types: data, event, and schema.
The below two commands are equivalent:
Get-WmiObject –namespace root\Microsoft\SqlServer\ComputerManagement10 –class ClientNetworkProtocol -filter "ProtocolName=’np’"
Get-WmiObject –namespace root\Microsoft\SqlServer\ComputerManagement10 -query "Select * From ClientNetworkProtocol Where ProtocolName=’np’"
WQL queries can be divided into three types: data, event, and schema:
Data queries are used to retrieve class instances and data associations.
Event queries are used to subscribe to WMI events.
Schema queries are used to retrieve class definitions and schema associations.