In yesterday’s Why WMIC is Useful!, I talked about using Windows Management Instrumentation Command-line (WMIC) to troubleshoot WMI issues. I need to user WMIC to troubleshoot a x86 problem on a x64 computer. You might think that Wbemtest would be the tool to use but on a x64 computer there is no x86 version of webemtest on those computers. You might be wondering about how to use WMIC for similar issues, so I thought that I would share the steps I take.
From an elevated command prompt, type: wmic path <class name> get * where class name is the WMI class that you want to query. Also notice that it will by default query the root\cimv2 namespace.
The command above will retrieve all instances from the Enhansoft Monitor Inventory WMI class within the root\cimv2 namespace.
As you can see from the output above, that it is from WMIC. As you can tell, it is much harder to read compared to the results displayed in wbemtest (see the example below). This is why, if I have the choice, I opt to use wbemtest for most cases. However on my computer I would WMI Explorer as it would be even easer to use and read the results.
Tip: If you want to read the data in a nicer way, simply pipe the data into a text file and then read it within Notepad. For example, wmic path es_mirv5 get * > Mir.txt then you parse the text file if you like.
Also keep in mind that you can use PowerShell to query WMI classes and it will allow you to format the output if that is what you want. Or you can pass the results of the WMI class query from PowerShell to another PowerShell commandlet.
Hopeful when you need to query WMI via the command line or as x86 process on x64 computer, you will remember this post and user WMIC. If you have any questions, please feel free to touch base @Garthmj.