Skip to content

Instantly share code, notes, and snippets.

@mansouryaacoubi
Created September 4, 2018 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mansouryaacoubi/3510128a2bef7d484152e0906644085e to your computer and use it in GitHub Desktop.
Save mansouryaacoubi/3510128a2bef7d484152e0906644085e to your computer and use it in GitHub Desktop.
Check whether MY Servers are reachable
title Checking active hosts
@echo off
color FC
:start
cls
echo Ping MYServer001...
ping -n 1 myserver001.yaacoubi.com | find "TTL=" >nul
if errorlevel 1 (
echo HOST NOT REACHABLE
timeout 3
) else (

echo HOST REACHABLE
pause
)
echo.
echo Ping 001...
ping -n 1 001.yaacoubi.com | find "TTL=" >nul
if errorlevel 1 (
timeout 3
echo HOST NOT REACHABLE
) else (

echo HOST REACHABLE
pause
)
echo.
echo Ping MYDynDNS001...
ping -n 1 mydyndns001.ddns.net | find "TTL=" >nul
if errorlevel 1 (
echo HOST NOT REACHABLE
timeout 3
) else (

echo HOST REACHABLE
pause
)
goto start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment