Press "Enter" to skip to content

Windows: What ports does application/program X have open?

I recently had to help somebody with a Windows 10 based application which offered a “connection” facility (i.e. enter your computer’s IP address and port and the 3rd party system would connect to it), but the application failed to say which port(s) it had open.

Whilst there are a number of ways to view open ports – such as Microsoft’s Sysinternal’s TCPView and NirSoft’s CurrPorts – I wanted to suggest a way which neither required an additional piece of software to be installed and didn’t require administrator access.

Here are the steps to find out what ports application “AppName” has open:

  1. Open a standard Windows command prompt (Windows+R , type cmd and the press Enter]
  2. In the box that appears type
    tasklist | findstr AppName
  3. It’ll then list entries each followed by digits such as
    AppName.exe 11028 Console 74,988 K
  4. Now in the command prompt box use the following command to list all open ports (netstat -ano), find which of those are “open to the world” (findstr 0.0.0.0), and which are those are made available via the specified “process identifier/PID” (in this case the 11028 PID : findstr 11028):
    netstat -ano | findstr 0.0.0.0 | findstr 11028
    (you may need to repeat if multiple PID/process numbers are listed).
  5. You will hopefully see something like:
    TCP 0.0.0.0:1234..
    where 1234 will be the port number you need.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.