- Dim result
- On Error Resume Next
-
- arrComputers = Array(".")
- For Each strComputer In arrComputers
- ' Wscript.Echo("begin--" & result)
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
- Set colItems = objWMIService.ExecQuery("SELECT CurrentConnections FROM Win32_PerfFormattedData_W3SVC_WebService",,48)
- For Each objItem In colItems
- ' Wscript.Echo("foreach:cc=" & objItem.CurrentConnections)
- result=objItem.CurrentConnections
- Next
- Wscript.Echo("end--" & result)
- Next
复制代码
转自 http://bbs.csdn.net/topics/390315464 |