PowerShell - Which TCP/UDP ports / Processes are listening?
Powershell makes it easy to find out which ports are listening and which processes are using those ports.
PowerShell - Which Ports are Listening
Get-NetTCPConnection -State Listen
PowerShell - Find out which process is listening on a TCP or UDP port on Windows?
Use this to check which process is using TCP port 49672:
Get-Process -Id (Get-NetTCPConnection -LocalPort 49672).OwningProcess
Use this to check which process is using UDP port 49672:
Get-Process -Id (Get-NetUDPEndpoint -LocalPort 49672).OwningProcess