Monthly Archive


root\wmi – speeding the testing

Testing the individual classes in root\wmi is a pain – so its time for some brute force.  I’ll select a group of classes and test the selection

gwmi -Namespace root\wmi -List system* | fw


I can then iterate through them calling get-wmiobject.

This is a command line activity so aliases are OK

gwmi -Namespace root\wmi -List system* | foreach {gwmi -Namespace root\wmi -Class $_.Name}


I could do this for all classes but it could become a bit difficult sorting out results if I get a lot of them.  We’ll see where this goes.

Leave a Reply