Check Open Ports on Your Windows PC [Using CMD & Powershel]
Have you ever wondered which applications are communicating over the internet or which network connections are active on your Windows PC? Your computer uses different network ports to communicate with other devices, websites, servers, and applications.
However, not all ports are always active. Some remain open because Windows services, installed applications, or background processes need them to communicate over a network. While this is normal, checking open ports can help you identify unexpected connections, troubleshoot network problems, and improve your computer’s security.
For example, if an application isn’t connecting to the internet, another service might already be using the required port. Similarly, if you suspect unauthorized network activity, checking open ports can help you identify which applications are listening for incoming connections.
Fortunately, Windows 11 and Windows 10 include several command-line tools that make this process easier. You don’t need to install third-party software to get started.
In this guide, we’ll show you how to check open ports on your Windows PC using Command Prompt (CMD) and PowerShell, identify the applications using them, and understand which ports might require further investigation.
Check Open Ports on Your Windows PC [Using CMD & PowerShell]
![Check Open Ports on Your Windows PC [Using CMD & Powershel]](https://gadgetsnurture.com/wp-content/uploads/2026/11/Check-Open-Ports-on-Your-Windows-PC-Using-CMD-Powershel-1024x576.jpg)
To check open ports on Windows 11 or Windows 10, open Command Prompt as an administrator and run netstat -ano. This command displays active network connections, listening ports, and their associated process IDs (PIDs). You can also use PowerShell commands such as Get-NetTCPConnection to view listening ports and identify the applications using them.
Windows provides multiple ways to inspect network ports. Before trying these methods, it’s helpful to understand what you’re looking for.
A network port is a communication endpoint that allows applications and services to exchange data over a network. Each port is identified by a number between 0 and 65535.
For example, port 80 is commonly used for HTTP traffic, port 443 is used for HTTPS, and port 3389 is associated with Remote Desktop.
When checking ports, you’ll commonly encounter three terms: LISTENING, which means an application is waiting for incoming connections; ESTABLISHED, which means an active connection has been created; and TIME_WAIT, which indicates that a connection has recently closed and is waiting for a short cleanup period.
Let’s explore the different methods.
Method 1: Check Open Ports Using Command Prompt (CMD)
Command Prompt is one of the easiest ways to check open ports on a Windows computer. It includes a command called Netstat, which displays network statistics, active connections, and listening ports.
You can use it to find which ports are open and retrieve the process IDs associated with them.
Step 1: Open Command Prompt as Administrator
First, click the Start button on your Windows taskbar.
Type CMD or Command Prompt in the search box.
When Command Prompt appears in the search results, right-click it and select Run as administrator.
If Windows displays a User Account Control (UAC) prompt, click Yes to continue.
Step 2: Run the Netstat Command
Once Command Prompt opens, enter the following command:
netstat -ano
Press Enter to execute it.
Windows will display a list of network connections and listening ports.
The command includes three important switches. The -a switch displays all active connections and listening ports. The -n switch displays addresses and port numbers in numerical format. The -o switch displays the process ID (PID) associated with each connection.
Step 3: Understand the Netstat Results
After running the command, you’ll see several columns in the output.
The Proto column displays the network protocol, such as TCP or UDP.
The Local Address column shows your computer’s IP address and the port number being used.
The Foreign Address column displays the remote device or server address.
The State column shows the current connection status, such as LISTENING or ESTABLISHED.
Finally, the PID column displays the process ID associated with the connection.
For example, if you see 0.0.0.0:80 with the LISTENING status, it means a process is listening on port 80 across the computer’s available IPv4 interfaces.
Step 4: Display Only Listening Ports
If you don’t want to go through every network connection, you can filter the results to display only listening TCP ports.
Enter this command:
netstat -ano | findstr LISTENING
Press Enter.
Windows will now display connections with the LISTENING state, making it easier to identify ports waiting for incoming TCP connections.
Keep in mind that this command doesn’t display UDP listeners because UDP doesn’t use TCP connection states.
Method 2: Find Which Application Is Using an Open Port
Finding an open port is only part of the process. You might also want to know which application or Windows service is using it.
Fortunately, you can use the process ID (PID) displayed by Netstat to identify the associated application.
Step 1: Find the Process ID
Open Command Prompt as an administrator and run:
netstat -ano
Look at the last column to find the PID associated with the port you’re investigating.
For example, suppose port 8080 is listening and its PID is 4560.
You’ll need this number to identify the application.
Step 2: Identify the Application Using Task Manager
Press Ctrl + Shift + Esc to open Task Manager.
Click the Details tab in the left sidebar.
If you’re using an older Windows 11 layout, you might need to click More details first.
Look for the PID column and find the number you obtained from Netstat.
In this example, search for PID 4560.
The corresponding row will show the application or process using that port.
Step 3: Investigate the Application
Once you’ve identified the process, check whether it’s something you recognize.
For example, it might belong to a web server, browser, remote access application, or Windows service.
If you don’t recognize the application, right-click its entry in Task Manager and select Open file location.
Check the executable’s location and publisher details before deciding whether it needs to be removed or disabled.
Don’t terminate an unfamiliar process simply because it’s using an open port. Some essential Windows services require network access to function correctly.
Method 3: Check Open Ports Using PowerShell
PowerShell provides another convenient way to inspect network connections on Windows.
Unlike Command Prompt, PowerShell includes networking commands that return structured information, making it easier to filter and organize results.
Step 1: Open Windows PowerShell
Click Start and type PowerShell in the search box.
Right-click Windows PowerShell and select Run as administrator.
You can also open Windows Terminal as an administrator and select a PowerShell tab.
Step 2: Display All Listening TCP Ports
Enter the following command:
Get-NetTCPConnection -State Listen
Press Enter.
PowerShell will display all TCP connections currently in the listening state.
You’ll see information such as the local IP address, local port, remote address, remote port, and connection state.
The LocalPort column is particularly important because it displays the port number being used by the listening application.
Step 3: Display Only Port Numbers
If you only want to see the listening port numbers without additional information, use:
Get-NetTCPConnection -State Listen | Select-Object -ExpandProperty LocalPort
This command filters the output and displays only the local port numbers.
It’s useful when you want a quick overview without reading through multiple columns.
Step 4: Check a Specific Port
Suppose you want to check whether port 8080 is listening on your computer.
Run:
Get-NetTCPConnection -LocalPort 8080 -State Listen
Replace 8080 with the port number you want to investigate.
If PowerShell returns a result, a TCP connection is listening on that port. If no matching result appears, there isn’t a TCP listener matching those conditions.
Check Which Process Is Using a Port in PowerShell
PowerShell can also help you identify the process associated with an open TCP port.
This saves you from manually searching through Task Manager.
Step 1: Retrieve the Listening Port Information
Open PowerShell as an administrator and enter:
Get-NetTCPConnection -State Listen
Look for the LocalPort and OwningProcess columns.
The OwningProcess column contains the PID of the application or service using the port.
Step 2: Find the Process Name
Now, run the following command:
Get-Process -Id 4560
Replace 4560 with the PID displayed in your PowerShell results.
PowerShell will return information about the corresponding process, including its name and process ID.
Step 3: Combine Both Commands
You can also combine the commands to display listening ports alongside their process names.
Run:
Get-NetTCPConnection -State Listen |
Select-Object LocalAddress, LocalPort, OwningProcess,
@{Name=”ProcessName”;Expression={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName}}
This command displays the local address, listening port, process ID, and associated process name.
It’s particularly helpful when you’re investigating multiple open ports and don’t want to look up each PID separately.
Check Open UDP Ports on Windows
So far, we’ve focused mainly on TCP connections. However, Windows applications also use UDP (User Datagram Protocol) to communicate over networks.
Unlike TCP, UDP doesn’t establish a connection before sending data. That’s why you won’t see a LISTENING state for UDP connections in Netstat.
To check UDP endpoints, open Command Prompt as an administrator and run:
netstat -ano -p udp
Press Enter.
Windows will display UDP endpoints, their local addresses, and the associated process IDs.
You can also use PowerShell:
Get-NetUDPEndpoint
This command displays the UDP endpoints currently configured on your computer.
To identify the associated applications, check the OwningProcess column and use the following command:
Get-Process -Id 4560
Replace the example PID with the actual process ID.
Remember that a UDP endpoint doesn’t necessarily mean the application is accepting connections from the internet. It simply indicates that the application has a local UDP endpoint available for communication.
FAQs
1. How Do I Check If a Port Is Open in Windows 11?
Open Command Prompt as an administrator and run netstat -ano. Look for the port number under Local Address and check its state. For TCP ports, LISTENING indicates that an application is waiting for incoming connections.
2. How Do I Check Port 443 in CMD?
Open Command Prompt and enter netstat -ano | findstr :443. Windows will display matching network connections involving port 443. Check the Local Address and State columns to determine whether a local application is listening on that port.
3. Is It Safe to Have Open Ports on My Computer?
Yes, having open ports is normal. Windows services, browsers, and other applications use them for communication. However, unnecessary or unexpected listening ports can create security risks, so investigate unfamiliar applications and restrict access when necessary.
4. What Is the Difference Between TCP and UDP Ports?
TCP establishes a connection between devices before transferring data, while UDP sends data without establishing a traditional connection. TCP is commonly used for web browsing, while UDP is frequently used for DNS queries, streaming, and online gaming.
5. How Can I Close an Open Port in Windows?
You generally need to identify the application or service using the port and configure it to stop listening. You can also create an appropriate inbound rule in Windows Defender Firewall with Advanced Security to block unwanted incoming traffic.
Blocking a port through the firewall doesn’t necessarily stop the application from listening locally.
