NativeServices.RunWmiQuery
Method | |
---|---|
Module | NativeServices |
Library | Core |
Action | Execure a WMI query. |
Parameters |
|
| |
NoteFor | |
Note | |
| |
Return values | A row for each instance returned by the WMI query. The number of columns depends on ResultsAsText:
|
Example | // return multiple columns @query = "SELECT AdapterType, Name, Index, InterfaceIndex, MACAddress FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true"; NativeServices.RunWmiQuery(Namespace:"root\\cimv2", Query:@query); //return one column 'Data' @query = "SELECT AdapterType, Name, Index, InterfaceIndex, MACAddress FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true"; NativeServices.RunWmiQuery(Namespace:"root\\cimv2", Query:@query, ResultsAsText:true); |
Platforms |
|
Notes | Avoid using " This is because:
|