How to See what process is using a TCP port in Windows Server 2008, 2008 R2

Started by Adventech, February 17, 2013, 12:18:28 AM

Previous topic - Next topic

Adventech

PROBLEM:
How to See what process is using a TCP port in Windows Server 2008, 2008 R2?

SOLUTION:
The following command will show what network traffic is in use at the port level:

Netstat -a -n -o

The -o parameter will display the associated process identifier (PID) using the port. This command will produce an output similar to what is below.



With the PIDs listed in the netstat output, you can use the following command to see the application that is using the port.

tasklist /svc /FI "PID eq 1812"

In this example I was looking for what application is using port 1812.

Adventech Group, Inc.
Bringing Integrity to Information Technology
https://adventech.net