' VBScript pings angegeben Server alle 5 Sekunden an und pingt deutlicher, wenn System wieder erreichbar ist if wscript.Arguments.count = 0 then msgbox "Bitte mit Angabe der IP-Adresse oder Hostname starten" wscript.quit(1) else strServername = wscript.arguments.unnamed(0) wscript.echo "Soundping: Pinging Server:" & strServername dim objWMI Set objWMI = GetObject("winmgmts://localhost/root/cimv2") while wmiping(strServername) wscript.echo "Soundping: "&strServername&" is still reachable - Waiting 2sek für Downtime" wscript.sleep(2000) wend while not wmiping(strServername) wscript.echo "Soundping: "&strServername&" is NOT YET reachable - Waiting 5 Sek für next test" & chr(7) wscript.sleep(5000) wend while wmiping(strServername) wscript.echo "Soundping: "&strServername&" is reachable AGAIN" wscript.sleep(5000) wscript.echo chr(7) : wscript.echo chr(7) : wscript.echo chr(7) wend end if Function wmiping(strMonitorIP) Dim PingResults, Pingresult Set PingResults = objWMI.ExecQuery("SELECT * FROM Win32_PingStatus WHERE Address = '" + strMonitorIP + "'") wmiping = False For Each PingResult In PingResults If PingResult.StatusCode = 0 Then wmiping = True End If Next End Function