|
|
| Purpose: | Query the Windows Management Interface |
| Format: | WMIQUERY [/A /B /C /H] namespace "query string" [index] |
| namespace | The namespace to query |
| "query string" | WQL query string |
| index | Class instance |
Usage:
You can use a single period . for namespace to default to root\cimv2.
For more details on what is available, see the WMI and WQL documentation on MSDN (msdn.microsoft.com), and download the "WMI Code Creator" from Microsoft and browse the available namespaces, classes, and properties.
For example, to query the name property from the Win32_Processor class:
wmiquery root\cimv2 "SELECT name FROM Win32_Processor"
To query available classes:
wmiquery /A root "select name from __namespace"
Options:
| /C | Display all the matching class names for the specified namespace. "query string" is the filter to apply to the returned values; it can contain wildcards. For example: |
wmiquery /c . "win32_q*"