How to Check If a Port Is Open on Windows (4 Methods)

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.

PowerShell window showing a Test-NetConnection port test and the TcpTestSucceeded True result highlighted
Run Test-NetConnection with a port (1). TcpTestSucceeded True (2) means the port is open.

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)

  1. Right-click Start and open Windows PowerShell or Terminal.
  2. Run: Test-NetConnection -ComputerName example.com -Port 443
  3. 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)

  1. Open Command Prompt.
  2. Run netstat -ano | findstr :8080 to check a specific port, or netstat -ano | findstr LISTENING for all listening ports.
  3. 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

  1. Press Windows key + R, type resmon, and press Enter.
  2. Open the Network tab and expand Listening Ports.
  3. 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

  1. Use Test-NetConnection -Port to test a remote port.
  2. Use netstat -ano or Resource Monitor to see listening ports on your PC.
  3. Check the firewall, service, and router if a port is closed.
  4. Open only the ports you need.