2012年7月7日星期六
Win32_QuickFixEngineering.Vbs
'好久没有写脚本了.
'这是在已知ip,域名,用户名,密码的情况下通过wmi获取远程电脑上的补丁的信息.
'made at 2012.07.07
'email:kouleguan at hotmail dot com
'homepage:http://correy.webs.com
On Error Resume Next
strComputer = "10.101.0.133"
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer, "root\cimv2", "administrator", "123456", , "ntlmdomain:dp-correy-2003")
Set colSwbemObjectSet = objSWbemServices.ExecQuery("Select * from Win32_QuickFixEngineering")
For Each objItem in colSwbemObjectSet
Wscript.Echo "//////////////////////////////////////////////////////////////////////////"
Wscript.Echo "HotFixID: " & objItem.HotFixID '此值是"File 1"时,下面的就是kbXXXXXXXX,并且出重复.
Wscript.Echo "ServicePackInEffect: " & objItem.ServicePackInEffect
Next
'made by correy.
订阅:
博文评论 (Atom)
没有评论:
发表评论