


The property you are looking for is OwningProcess. However, you could always get it by formatting the output. The default output of Get-NetTCPConnection does not include Process ID for some reason and it is a bit confusing. I guess that it should also work on older Windows versions. With PowerShell 5 on Windows 10 or Windows Server 2016, run the Get-NetTCPConnection cmdlet. Make sure “Show processes from all users” is selected. If you don’t see a PID column, click on View / Select Columns. Look for the PID you noted when you did the netstat in step 1. Note the PID (process identifier) next to the port you are looking at. NOTE: To find the process under Task Manager Look at the process name directly under that. Note that this optionĬan be time-consuming and will fail unless you have sufficientįind the Port that you are listening on under "Local Address"


Name is in at the bottom, on top is the component it called,Īnd so forth until TCP/IP was reached. Sequence of components involved in creating the connection Multiple independent components, and in these cases the In some cases well-known executables host b Displays the executable involved in creating each connection or Open a command prompt window (as Administrator) From "Start\Search box" Enter "cmd" then right-click on "cmd.exe" and select "Run as Administrator"Įnter the following text then hit Enter. o Displays the owning process ID associated with each connection. n Displays addresses and port numbers in numerical form. Note that this option can be time-consuming and will fail unless you have sufficient permissions. In this case the executable name is in at the bottom, on top is the component it called, and so forth until TCP/IP was reached. In some cases well-known executables host multiple independent components, and in these cases the sequence of components involved in creating the connection or listening port is displayed. b Displays the executable involved in creating each connection or listening port. a Displays all connections and listening ports. (Add -n to stop it trying to resolve hostnames, which will make it a lot faster.) UDP Get-Process -Id (Get-NetUDPEndpoint -LocalPort YourPortNumberHere).OwningProcess PowerShell TCP Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess
