How To Find All Listening Ports On A Windows Computer With PowerShell

Trying to spin up a new application that needs to be accessible over the network, but finding out that the port it wants to use has already been claimed? Can’t change the port within the application? I guess you’re going to have to find which other application already claimed it.

But don’t go blinding closing processes, instead use PowerShell to list all currently listening ports and identifying which process has claimed them.

In this snip, Josh will show you how to use the Get-NetTCPConnection cmdlet to quickly identify TCP ports that are listening for connections from the network, and their owners.

Prerequisites include: PowerShell