Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Windows Troubleshooting: Administrator Guide


How to check for used ports on Windows?

Using Command Prompt

  1. Netstat: This command displays active connections and listening ports.
    • Open Command Prompt (you can search for cmd in the Start menu).
    • Type netstat -ano and press Enter. This will list all ports in use along with the process IDs (PIDs) using them.
    • To find a specific port, you can use netstat -ano | findstr "PORT_NUMBER", replacing PORT_NUMBER with the port you’re interested in.
  2. TCPView: This is a graphical utility from Sysinternals that provides a more detailed view of TCP and UDP endpoints. You need to download it from Microsoft’s website.

Using PowerShell

  • Open PowerShell (you can search for powershell in the Start menu).
  • Run the following command: Get-NetTCPConnection | Where-Object { $_.LocalPort -eq PORT_NUMBER }, replacing PORT_NUMBER with the port you want to check.
  • Alternatively, you can use Get-Process -Id (Get-NetTCPConnection -LocalPort PORT_NUMBER).OwningProcess to get more information about the process that’s using the port.

Using Resource Monitor

  1. Open Resource Monitor, which can be found by searching in the Start menu or under the “Performance” tab of Task Manager.
  2. Go to the “Network” tab.
  3. Look at the “Listening Ports” section to see which ports are in use and by which processes.
Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x