WMI Live

imageSimilar to the enhanced SQL support, PrimalScript 2009 provides enhanced WMI and WQL support. WMI is an important tool in the administrators arsenal. It allows you to accomplish many tasks, local and remote with very little effort. However, the sheer number of WMI classes and their properties can be overwhelming and make it sometimes hard to quickly discover what you need.

The new object browser in PrimalScript 2009 lists all your WMI namespaces, their classes and each classes properties.

The classes inside any given namespace are sorted and grouped by their prefix (CIM, WIN32 etc.), so you can more easily navigate the vast number of items.

Double clicking on a class or property will open the help window. If the help window is already open, simply selecting an item is enough.

The help window for WMI shows any information your computer has for the selected class or property along with generated sample code for PowerShell and VBScript.

image

Now, just getting the WMI class and the properties may not be enough to decide if  this is what you need in your script.
You may actually have to run that query to see if it matches your requirements.

That is where PrimalScript 2009’s WQL window comes in:

image

You can just copy the sample query from the help window, insert it into the WQL window, select the matching namespace, press Enter and you will see the results.

Now you can fine tune the WQL query to get exactly the properties you need and insert that into your script.