Scripting HowTo's

Simple Ping Monitor – Windows

Share This:

Just a simple script thrown together to record the time and date of an outage on a server using ping from a Windows machine. You can view the data in Excel from this script if you set excel to separate the file using carriage returns.

@ECHO OFF
echo Monitoring Server see output.txt for logged entries
echo Ctrl + C to Cancel
:Ping
echo %time% %date% >>output.txt && ping -n 1 10.1.1.253 | find "time" | find "Re" >>output.txt
timeout 5 >> nul
GOTO ping

Leave a Reply

Your email address will not be published. Required fields are marked *