Tuesday, July 5, 2011

Rexx WMI Example using Instances

You can download the scripting program for generating these scripts at:

http://www.planetmps.com/wmiscriptsinstances.html

locator = .OLEObject~new("WbemScripting.SWbemLocator")
svc = locator~ConnectServer(".", "root\cimv2")
svc~Security_~AuthenticationLevel = 0
svc~Security_~ImpersonationLevel = 3
ob = svc~Get("Win32_Process")
objs = ob~Instances
do obj over objs
    do prop over obj~Properties_
    end
exit
end

No comments:

Post a Comment