Home - Programming - Windows: Can't open a port. Need to see what process has the port open.

PROBLEM: Windows - Can't open a port. Need to see what process has the port open.

SOLUTION: Netstat will give you a list of ports, protocols and addresses that have active connections.

netstat -a -n -o

Tasklist will give you a list of processes and their names. Use the PID from the netstat list to get information about the process.

tasklist /svc /FI "PID eq pid-from-netstat"

Alternatively, bring up taskmgr, Processes tab, menu option View | Select columns, check PID, and you can see the processes with their PIDs in real time.

If you need to scan ports, research PortQry. If you need port monitoring and logging, research PortRptr.


Todd Grigsby