Ports are like doors into your computer. Web servers open port 80, Email uses 25, etc. A "Port Scan" checks which doors are open. While professional tools like Nmap are standard, Windows has built-in ways to check local ports.
1. Checking Your Own Ports (Netstat)
Use netstat to see what connections your computer has established and which ports it is listening on.
Try the command
List all open ports numerically!
Build the command
netstat
Terminal
C:\Users\User>netstat -a
2. Analyzing the Output
- LISTENING: The port is open and waiting for a connection (e.g., a web server running on your machine).
- ESTABLISHED: An active connection exists (e.g., your browser loading a webpage).
Command Prompt
C:\Users\User>netstat -an | find "LISTENING"
3. Testing a Remote Port (Telnet/PowerShell)
How do you check if another computer has a port open?
Old school: telnet scanme.nmap.org 80
Modern way: PowerShell.
powershell -Command "Test-NetConnection scanme.nmap.org -Port 80"
Knowledge Check
1 / 3Which netstat flag shows 'Listening' ports?
References
These documentation links provide authoritative details for the commands used in this article.