NativeServices.GetWmiNames
Method | GetWmiNames |
---|---|
Module | NativeServices |
Library | Core |
Action | Where they exist, returns all the namespaces, classes and columns that match the locator strings. |
Parameters |
|
Return values | If nothing matches all three parameters then the instruction will return success but no data. If anything matches then the result set will contain one row for each match on the three locator strings.
|
Example | This should match one row on all Windows machines @result = NativeServices.GetWmiNames(Namespace:"root\\cimv2", Class:"Win32_Processor", Column:"Manufacturer"); |
Platforms |
|
Notes | The parameters can be wildcard expressions, so this method can dump every namespace, class and column if desired: @result = NativeServices.GetWmiNames(Namespace:"*", Class:"*", Column:"*"); which would be a big result set with many thousands of rows. Or it could be narrowed down: @result = NativeServices.GetWmiNames(Namespace:"root\\*", Class:"Win32_P*", Column:"M*"); For all namespaces beginning "root\\", for all the classes in those namespaces starting with "Win32_P", for all the columns in those classes starting with M, return the matching results will be issued as one unique WMI Namespace + class + column row per match in the result set. Be warned that the last example presented here took 85 seconds to complete and returned 603 rows, so try to be specific if possible. |