Board logo

标题: [转贴] VBS脚本获取IIS的连接数 [打印本页]

作者: HAT    时间: 2015-4-29 17:24     标题: VBS脚本获取IIS的连接数

  1. Dim result
  2. On Error Resume Next
  3. arrComputers = Array(".")
  4. For Each strComputer In arrComputers
  5.     ' Wscript.Echo("begin--" & result)
  6.     Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
  7.     Set colItems = objWMIService.ExecQuery("SELECT CurrentConnections FROM Win32_PerfFormattedData_W3SVC_WebService",,48)
  8.     For Each objItem In colItems
  9.         ' Wscript.Echo("foreach:cc=" & objItem.CurrentConnections)
  10.         result=objItem.CurrentConnections
  11.     Next
  12.     Wscript.Echo("end--" & result)
  13. Next
复制代码

转自 http://bbs.csdn.net/topics/390315464




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2