Partager via


Easy way to find out which process is touching which ports

From a cmd window run:

tasklist /FI "IMAGENAME eq yourImageName.exe"

or for services:

tasklist /FI "SERVICES eq yourServiceName"

That will give you the PID(s) of your app or service. Then you can do (assuming pid 1234):

netstat -ano |findstr "1234"

This will tell you what ports your app or service is listening on and what ports it is using. If there is more than one pid, for some reason, you can include multiple PIDs in the string with spaces between them.