discovery.wmiQuery
discovery.wmiQuery(target, query, namespace)
Performs a WMI query on a Windows computer. Returns a list of DiscoveredWMI
nodes.
Where:
target
– the endpoint being scanned. In this case, a Windows computer.query
– the WMI query performed on the targetnamespace
– the WMI namespace to query, for example,root/cimv2
. Used with theclass_nam
e to identify objects of interest.
The following sample code from the Adobe.AcrobatElementsServer
pattern module shows the usage of the function:
constants ... wmiNS := raw 'root\CIMV2'; end constants; ... ... body host := model.host(process); ... // WMI query versioning cmd := text.replace(process.cmd, "\\", "\\\\"); wmiQuery := "SELECT Version FROM CIM_DataFile where Name='%cmd%'"; wmi_results := discovery.wmiQuery(host, wmiQuery, wmiNS); ... end body;
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.