Skip to content

Instantly share code, notes, and snippets.

@fabioxgn
Created September 4, 2013 19:53
Show Gist options
  • Save fabioxgn/6442005 to your computer and use it in GitHub Desktop.
Save fabioxgn/6442005 to your computer and use it in GitHub Desktop.
Script para pingar todas as máquinas da rede
@echo off
if %1!==! goto help
if %1!==/?! goto help
echo.
echo Pinging %1.1 - %1.254 (this will take a little time).
echo.
for /l %%p in (1,1,254) do ping %1.%%p -n 1 -w 10 | find /i "resposta"
echo.
echo Done.
echo.
goto end
:help
echo.
echo Please specify the subnet you wish to ping.
echo.
echo "PingC 192.168.0"
echo - pings 192.168.0.1 - 192.168.0.254
echo.
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment