How to find which program uses or blocks port in Windows

There are many ways and more tools find which process is using specific TCP port. In this article, I am going to explain how to find listing TCP ports and the associated process using netstat command and Resource Monitor tool.

Find what process is using a TCP port by NETSTAT command

Netstat is a command line utility, it displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols).

Use the below command to list active TCP connections and the associated program.

netstat -a -b -n

-a Displays all connections and listening ports.

-b Displays the executable involved in creating each connection or listening port

-n Stops resolving ip address into host name to give fast results

Note: Run the command prompt with elevated privilege (Run as Administrator)

How to find which application uses or blocks port in Windows 

From the above image, you can clearly find the port 1025 is being used by the process wininit.exe. In some cases, well-known executables host multiple independent components, and in these cases the sequence of components involved in creating the connection or listening port is displayed. In this case the executable name is in [] at the bottom, on top is the component it called, and so forth until TCP/IP was reached.

In another way, You can combine the commands netstat and tasklist to determine what process is using a TCP port. The following command lists the active TCP connection and the associated process id.

netstat -a -n -o

-o Displays the process ID (PID) for each connection. You can find the application based on the PID on the Processes tab in Windows Task Manager.

How to find which process uses or blocks port in Windows

Now, you can get the process ID (PID) for the port which you want to track the process and you can find the associated application based on the PID value on the Processes tab in Windows Task Manager.

For quick result, you can use the command line tool tasklist to find the associated process name from the process ID (PID). Use below command to get process name for the process ID 948.

tasklist /svc /FI "PID eq 948"
How to find what program uses or blocks port in Windows

Find which application is using or blocks a TCP port by Resource Monitor

You can also find the listing TCP ports and the associated process by using native GUI tool Resource Monitor. Follow the below steps to find listing (using) TCP ports using Resource Monitor.

1. Open the Resource Monitor tool by running the command resmon.exe in run Window (or you can open through this shortcut: Start->All Programs->Accessories->System Tools->Resource Monitor).

2. Click the Network tab and expand the panel Listing Ports.

How to find what process uses or blocks port in Windows

3. Now, you can find listing port and associated process name under the column Image.

Advertisement

Leave a Comment