News & Updates

How to Scan a Network with IP Scanner CLI on Windows

By Jonathan Pierce 6 min read 4383 views

How to Scan a Network with IP Scanner CLI on Windows

If you’ve ever needed a quick glance at every device humming behind your router, the command‑line interface (CLI) version of an IP scanner can be a lifesaver. No flashy GUI, just pure text, lightning‑fast results, and enough flexibility to script the whole thing. Below we’ll walk through the basics of installing, configuring, and running an IP scanner from the Windows command prompt, plus a few tricks for those who like to dig deeper.

Why Choose the CLI Over a GUI?

Graphical tools are great for occasional checks, but they come with overhead—extra memory, occasional ads, and the need to click through menus. The CLI version runs in a single console window, consumes almost no resources, and can be combined with batch files or PowerShell scripts for automated sweeps.

In short, if you:

  • Prefer speed over visual flair
  • Need to scan from a remote session (SSH, WinRM)
  • Want to log results straight to a file

the command‑line approach is the obvious choice.

Getting the Right Tool

There are several free scanners that ship a CLI build—Nmap, Angry IP Scanner, and Advanced IP Scanner each have Windows binaries. For this guide we’ll use Angry IP Scanner because its CLI syntax is straightforward and it doesn’t require elevated privileges for a basic scan.

1. Visit the official site and download the angryip‑scanner‑cli.zip package.

2. Extract the zip to a folder you can remember, for example C:\Tools\AngryIP.

3. Open a Command Prompt (Windows + R, type cmd, hit Enter) and navigate to that folder:

cd C:\Tools\AngryIP

If you plan to run the scanner from any location, add the folder to your PATH environment variable—just right‑click “This PC,” choose Properties → Advanced, then Environment Variables, and edit Path.

Running a Basic Scan

The simplest command looks like this:

ipscan.exe -r 192.168.1.1-254

What happens?

  • -r tells the scanner to treat the argument as a range.
  • The IP range 192.168.1.1-254 covers every possible host on a typical home subnet.

Press Enter, and the tool will ping each address, attempt a TCP port 80 connection, and list any host that responds. The output appears directly in the console:

192.168.1.10   Hostname: office-pc   Ping: 4ms   Ports: 80(open)

192.168.1.22 Hostname: printer01 Ping: 6ms Ports: 80(closed)

...

It’s that simple.

Adding Depth: Port Scanning and Timeouts

Want more than a ping check? Append the -p switch followed by a comma‑separated list of ports, or use -p 1-1024 to sweep the first thousand ports. Example:

ipscan.exe -r 192.168.1.1-254 -p 22,80,443

Here we target SSH (22), HTTP (80), and HTTPS (443). The scanner will attempt a connection to each port and report its state.

Network latency can sometimes cause false “host down” results. Adjust the timeout with -t (milliseconds):

ipscan.exe -r 192.168.1.1-254 -t 1000

One‑second waits are generous enough for most Wi‑Fi links without dragging the overall runtime to a crawl.

Saving Results for Later Analysis

When you’re troubleshooting or just need a record, pipe the output to a file:

ipscan.exe -r 192.168.1.1-254 -p 22,80,443 -t 800 > scan_results.txt

The > operator creates (or overwrites) scan_results.txt in the current directory. Open it with Notepad, feed it into Excel, or feed it straight into another script.

For a CSV‑friendly format, add the -c flag:

ipscan.exe -r 192.168.1.1-254 -p 22,80,443 -c > scan.csv

Now each line looks like 192.168.1.10,office-pc,4,80(open), perfect for quick import.

Automating with a Batch File

If you scan the same subnet daily, put the command into a .bat file:

@echo off

set RANGE=192.168.1.1-254

set PORTS=22,80,443

set TIMEOUT=800

set OUT=%date%_scan.txt

C:\Tools\AngryIP\ipscan.exe -r %RANGE% -p %PORTS% -t %TIMEOUT% > "%OUT%"

echo Scan saved to %OUT%

Save this as daily_scan.bat and schedule it with Task Scheduler to run at whatever hour suits you. The %date% variable injects today’s date into the filename, so you end up with a tidy archive.

When the Scan Misses Something

Occasionally a device will lie silent to ICMP echo requests (pings) yet still have open ports. In that case, add the -n switch to skip the ping stage and go straight to port probing:

ipscan.exe -r 192.168.1.1-254 -p 80 -n

Be aware that some networks flag pure port scans as suspicious, so use this sparingly on corporate LANs where security policies might trigger alerts.

Integrating with PowerShell for Fancy Output

PowerShell can parse the CSV output and present a tidy table:

$data = Import-Csv -Path .\scan.csv -Header IP,Host,Latency,PortInfo

$data | Where-Object {$_.PortInfo -match "open"} |

Sort-Object IP |

Format-Table -AutoSize

The one‑liner filters only hosts with at least one open port, orders them by IP, and prints a clean table. It’s a handy way to turn raw scan data into something immediately readable.

Troubleshooting Common Hiccups

  • “Access denied” errors: The CLI version typically runs without admin rights, but if you scan privileged ports (<1024) on Windows, you may need to launch the console as Administrator.
  • Firewall blocks: Windows Defender Firewall may reject inbound ping or port probes. Temporarily allow ipscan.exe through the firewall, or add an inbound rule for the specific ports you’re testing.
  • Unexpected blanks: Some routers segment large subnets into multiple VLANs. If you see large gaps in the output, double‑check that the target range actually resides on the same broadcast domain.

Wrapping Up

Using a CLI IP scanner on Windows feels a bit like having a Swiss‑army knife tucked into your console. It’s fast, scriptable, and—most importantly—transparent. Whether you’re confirming that a new IoT gadget has joined the network, building a nightly inventory report, or simply curious about which ports are exposed, the steps above give you a solid foundation. Grab the tool, fire up a prompt, and let the numbers do the talking.

Full Advanced IP Scanner Review and How to Scan a Network
Free IP Scanner - Download
Ip Scanner 12 Best IP Scanners For Networks In 2025 With Free
Free IP Scanner - Download

Written by Jonathan Pierce

Jonathan Pierce is a Chief Correspondent with over a decade of experience covering breaking trends, in-depth analysis, and exclusive insights.