Detect internet connectivity and reboot router as required

by Chris Hall/December 1, 2016

If you’re having issues with your internet connection and finding your Router is dropping Internet at random times, the below windows batch may help alleviate the issue as a temporary measure.

To run this, download a copy of plink.exe from the putty download page and save it to a server running onsite (as an example to C:\admin\plink.exe). Copy the below into a batch file in the same directory and save the file. You can then use Task Scheduler to run the task automatically during the day.

The script pings www.google.com and is the ping fails triggers a reboot on the router.

If needed you could setup this to email using VBS and/or log the reboots in a file by pipping the information out (you can do this by typing “ >> C:\admin\plink_log.txt” without the quotes at the end of the reboot command).

@echo off
ping -n 1 www.google.com
echo reboot|”C:\admin\plink.exe” -ssh -pw ******** admin@ reboot

← Back to News

Want to say hey or find out more?

If you're part of a small/medium or enterprise level we
can help address your IT Management needs.

Get in touch
View our Services
Make your data
work for you.
Contact Us

+61 438 661 875


Copyright © DataCommand Pty Ltd / Privacy Policy
ABN 98 205 256 068 / ACN 131 977 323