n3tw0rkadm1n1strat0r
IS-IT--Management
What am I doing wrong here? The script doesn't error out...
Code:
Dim strComputer, objShell
strComputer = computername
set objShell = CreateObject("WScript.Shell")
objShell.Run("%comspec% /K ping "" & strComputer & "" -t"), 0, True
If objShell = "Request timed out." then
msgbox "& strComputer & is now shutdown!"
Else
End if