监控网卡断网重启

@echo off
echo "网卡自动重启服务正在进行中......."
:begin
ping 218.85.157.99>D:\ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto ping2
goto loop

:ping2
ping 218.85.152.99>D:\ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto reboot
goto loop

:reboot
cmd /c netsh interface set interface name="NIC1" admin=disabled
cmd /c netsh interface set interface name="NIC1" admin=enabled

Last modification:August 7th, 2019 at 11:36 am
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment