Please enable JavaScript to view this site.

CMDebug / TCC-RT Help v. 27

Purpose:Query the Windows Management Interface


Format:WMIQUERY [/A /B /C /H /Q] namespace "query string" [index]


namespaceThe namespace to query        
"query string"WQL query string
indexClass instance


/A(ll instances)/H(eader)                





You can use a single period . for namespace to default to root\cimv2.


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"


For more details on what is available, see the WMI and WQL documentation on MSDN (, and download the "WMI Code Creator" from Microsoft at:


and browse the available namespaces, classes, and properties. WMI Code Creator is also a useful tool for generating WMI queries for use with WMIQUUERY.


If you don't enter any arguments, WMIQUERY will display its command dialog.




/A Display all class instances starting at "index".


/BSeparate class instances with a blank line.


/CDisplay 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*"


/HDisplay a header for class instances.


/QDon't display the property name when displaying properties.