Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.
Windows Commands / IT Support Guides
Map Windows listening ports with netstat
Match a Windows connection or listening port to its process ID.
Compiled for Sorlavit Kim · Published · Updated · 1 min read
Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified
Understand the problem
Run the check on the affected machine. Note the expected address, protocol and port.
Run the command
Run netstat -ano. It lists connections and listening ports, displays numeric addresses and includes the owning process ID.
netstat -ano
Read the output
Read Local Address for the port on this computer. For TCP, LISTENING is waiting for connections, while ESTABLISHED identifies an active connection. Match the PID in the last column.
Choose the next step
Use Task Manager or tasklist to match the PID to an application. Run netstat again if the entry disappears because connections and processes can change.
Before making changes
Confirm the service owner before changing or stopping anything. Keep the time and local address in your notes.