‘ online check bzw. ping mit VB-Script machen

terminal_server = “127.0.0.1″

cmd = “ping.exe -n 1 -w 100″
ip = InputBox(“IP-Adresse des Terminal Server?”, , terminal_server)

Set objshell = CreateObject(“WScript.Shell”)
rv = objshell.run(cmd & ” ” & ip, , True) ‘Server pingen bzw. online check durchführen’

If rv = 0 Then
WScript.Echo “System ” & ip & ” ist online.”
Else
WScript.Echo “System ” & ip & ” ist OFFLINE.”
End If


Leave a Comment


You must log in to post a comment.