Thursday, October 1, 2020

Find out which application is running on a specific port, using PowerShell?

Find out which application is running on a specific port, using PowerShell? 

let's take an example of port 4020. 

run the below PowerShell cmdlet. 

Get-NetTCPConnection | ?{$_.localport -eq 4020} | fl

 

Copy the PID. 

Run the below cmdlet. 

Get-Process -PID 2292 | fl

 

 The process name found on this is msvsmon.

 

No comments: