You can download the scripting program for generating these scripts at:
http://www.planetmps.com/wmiscriptsinstances.html
<?xml version='1.0' encoding='iso-8859-1'?>
<package>
<job>
<script language="ruby">
<![CDATA[
require("win32ole")
i=0
locator = WIN32OLE.new("WbemScripting.SWbemLocator")
svc = locator.connectserver()
svc.Security_.AuthenticationLevel = 0
svc.Security_.ImpersonationLevel = 3
ob = svc.Get("Win32_Process")
objs = ob.Instances
mystr = ""
objs.each{ |obj|
obj.Properties_.each{ |prop|
End
End
]]>
</script>
</job>
</package>
No comments:
Post a Comment