You can download the scripting program for generating these scripts at:
http://www.planetmps.com/wmiscriptsexecquery.html
$locator = CreateObject("WbemScripting.SWbemLocator")
$svc = $locator.ConnectServer(".", "root\cimv2")
$svc.Security_.AuthenticationLevel = 0
$svc.Security_.ImpersonationLevel = 3
$objs = $svc.ExecQuery("Select * From Win32_Process")
for each $obj in $objs
for each $obj in $objs
next
Exit For
next
No comments:
Post a Comment