Ping settings
Hej,Hvordan kan jeg i dette VBScript afgøre hvorlænge og hvormange gange der skal spørges på hver Ip adresse...?
Ligesom:
2 og 50 i denne linie:
Set objExec = objShell.Exec("ping -n 2 -w 50 " & strTarget)
*******************
On Error Resume Next
arrTargets = Array("192.168.0.1", "192.168.0.11", "192.168.0.12", "192.168.0.13")
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2")
For Each strTarget In arrTargets
Set colPings = objWMIService.ExecQuery ("Select * From Win32_PingStatus where Address = '" & strTarget & "'")
For Each objPing in colPings
If objPing.StatusCode = 0 Then
Wscript.Echo VbCrLf & strTarget & " responded to ping."
End If
Next
End If
Next
*******************