Checking whether a port is open helps you troubleshoot remote desktop, game servers, web servers, printers, and apps that will not connect. On Windows, "open" can mean two things: a program on your PC is listening on that port, or a remote computer is reachable on that port. Windows includes tools for both. This guide covers the commands to use, how to read the results, and what to check when a port is closed.
Quick Answer
To test whether you can reach a port on another computer, open PowerShell and run Test-NetConnection -ComputerName 192.168.1.20 -Port 3389 (replace the address and port). TcpTestSucceeded : True means the port is open and reachable. To see which ports are listening on your own PC, run netstat -ano | findstr LISTENING in Command Prompt.

Which Check Do You Need?
| Question | Tool |
|---|---|
| Can I connect to a port on another device? | Test-NetConnection (PowerShell) |
| Is an app on my PC listening on a port? | netstat or Resource Monitor |
| Is the port reachable from the internet? | Test from an outside network or a reputable online port checker |
| Is Windows Firewall blocking it? | Windows Defender Firewall with Advanced Security |
Method 1: Test-NetConnection (Remote Port)
- Right-click Start and open Windows PowerShell or Terminal.
- Run:
Test-NetConnection -ComputerName example.com -Port 443 - Look at TcpTestSucceeded: True means open, False means closed, filtered, or unreachable.
Short form: tnc example.com -Port 443. This tests TCP ports only.
Method 2: netstat (Listening Ports on Your PC)
- Open Command Prompt.
- Run
netstat -ano | findstr :8080to check a specific port, ornetstat -ano | findstr LISTENINGfor all listening ports. - The last column is the PID (process ID). Find the program in Task Manager > Details by sorting the PID column, or run
tasklist | findstr PID.
In PowerShell, Get-NetTCPConnection -State Listen | Sort-Object LocalPort shows listening ports with their owning process IDs.
Method 3: Resource Monitor
- Press Windows key + R, type resmon, and press Enter.
- Open the Network tab and expand Listening Ports.
- See each port, the program using it, and the firewall status.
Method 4: Telnet (Optional)
Telnet Client is an optional Windows feature. Turn it on in Control Panel > Programs > Turn Windows features on or off, then run telnet 192.168.1.20 3389. A blank screen means the connection opened; an error means it failed. Test-NetConnection is usually easier.
If the Port Is Closed
- Is the service running? Check that the app or service is started and configured for that port.
- Windows Firewall: open Windows Defender Firewall with Advanced Security and add an inbound rule for the port or program, only if you trust it.
- Router: for access from the internet, the router needs port forwarding to your PC. Only forward ports you need, since each open port is a potential security risk.
- ISP or network: some internet providers and workplaces block certain ports.
Common Ports
| Port | Service |
|---|---|
| 80 / 443 | Web (HTTP / HTTPS) |
| 3389 | Remote Desktop |
| 445 | File sharing (SMB) |
| 22 | SSH |
| 25565 | Minecraft Java server |
Looking for serial ports instead? See how to check COM ports.
If it is closed, see how to allow a port through Windows Firewall.
Frequently Asked Questions
How do I test a UDP port?
Test-NetConnection only tests TCP. UDP testing needs specialized tools, or check that the app on the other side responds.
Is it safe to open ports?
Only open ports you need for trusted services, and keep those services updated.
Why does the test say False when the app works locally?
The firewall or router may block outside connections, or the service may only listen on localhost.
Summary
- Use
Test-NetConnection -Portto test a remote port. - Use
netstat -anoor Resource Monitor to see listening ports on your PC. - Check the firewall, service, and router if a port is closed.
- Open only the ports you need.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.