Poor mans NMAP. Ping a subnet

by Dec 5, 2025IT Tips0 comments

Run the following snippet under a cmd.exe prompt on Windows.

for /l %i in (1,1,254) do @ping -w 100 -n 1 192.168.99.%i | find /i "bytes="

About the command

  • The @ symbol stops ping echoing to the terminal so you only get the output. If you want each command displayed as it runs remove it.
  • The -w 100 limits the amount of time ping waits for a reply before returning making the scan quicker (leave this out if you want to give the devices longer to reply before timing out)
  • find /i "bytes=" makes sure that only hosts that are responding are shown in the output

Sample output

C:\Users\Administrator>for /l %i in (1,1,254) do @ping -w 100 -n 1 192.168.99.%i | find /i "bytes="
Reply from 192.168.99.1: bytes=32 time<1ms TTL=64
Reply from 192.168.99.3: bytes=32 time=1ms TTL=128
Reply from 192.168.99.10: bytes=32 time<1ms TTL=64
Reply from 192.168.99.13: bytes=32 time<1ms TTL=128

Example output

0 Comments

Submit a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.