How do I find out which process is listening on a TCP or UDP port on Windows?

Question

How do I find out which process is listening on a TCP or UDP port on Windows?

in progress 0
admin 2 years 2022-12-25T19:14:49+00:00 1 Answer 330 views 1

Answer ( 1 )

    0
    2022-12-25T19:25:47+00:00

    You can monitor, troubleshooting which process is listening on a TCP or UDP port on Windows throughout different options but three listed below are common and recommended tools you can use?

    1) TCPVIEW free simple and awosam tools. Download from link below

    https://learn.microsoft.com/en-us/sysinternals/downloads/tcpview

    2)PowerShell

    a) TCP
    Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess
    b) UDP
    Get-Process -Id (Get-NetUDPEndpoint -LocalPort YourPortNumberHere).OwningProcess

    3) CMD

    netstat -a -b
    (Add -n to stop it trying to resolve hostnames, to allowed it to be faster)

    -a Displays all connections and listening ports.

    -b Displays the executable involved in creating each connection or listening port. 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. 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. Note that this option can be time-consuming and will fail unless you have sufficient permissions.

    -n Displays addresses and port numbers in numerical form.

     

Leave an answer