How to check open ports on Windows with PowerShell, CMD, and GUI

Whether you are diagnosing a blocked web service, investigating local firewall rules, or troubleshooting database connections, here are the most effective ways to check open ports on Windows 10 and 11.

Download Open Port Scanner for Windows
Standalone port-scanner.exe (~2.1 MB) • Native GPU GUI + CLI
Download .exe

Method 1: Check listening ports via CMD (netstat)

The built-in netstat command displays active TCP connections and listening sockets on your local Windows PC:

# Open CMD as Administrator and run:
netstat -ano -p tcp | findstr LISTENING

# Match a specific listening port (e.g. port 8080):
netstat -ano | findstr :8080

# Find which application owns the PID from netstat:
tasklist /fi "PID eq 1234"

Limitation: netstat only shows what is listening on your local machine; it cannot test ports across your network or check remote servers.

Method 2: Test remote ports with PowerShell (Test-NetConnection)

PowerShell includes Test-NetConnection (alias tnc), which functions like a basic TCP ping:

# Test if port 443 is open on a remote host:
Test-NetConnection -ComputerName example.com -Port 443

# Quick one-liner checking only the boolean result:
(Test-NetConnection 192.168.1.1 -Port 80).TcpTestSucceeded

Limitation: Test-NetConnection tests only one port at a time and takes 2-4 seconds per check, making multi-port or subnet sweeps painfully slow.

Method 3: Multi-port and subnet scan with Open Port Scanner

For auditing dozens of ports or checking all hosts on your subnet, use Open Port Scanner:

  1. Download port-scanner-windows-x64.zip and launch port-scanner.exe.
  2. To scan your local PC, click the local host button or enter 127.0.0.1.
  3. To scan your local Wi-Fi or office network, click the LAN target button (e.g. 192.168.1.0/24).
  4. Select a port preset (Quick, Standard, Web, or Databases) and click Scan. Open ports appear with latency and HTTP titles in seconds.
# Or run directly from Windows Terminal / PowerShell:
.\port-scanner.exe 127.0.0.1 --profile web
.\port-scanner.exe --lan --profile quick -o scan-results.csv

Summary comparison

Related guides

How to scan a local network for open ports

Step-by-step tutorial on discovering all devices and services.

Angry IP Scanner alternative without Java

Lightweight alternative running without Java Runtime Environment.