Sunday, September 29, 2024

How to clear windows port by powershell

 

  1. Open Power Shell from Windows search.
  2. Type "netstat -ano -p tcp" and hit enter.
  3. Find the PID (actualPID) of the process in the port in the list. (Eg: 8080)
  4. taskkill /F /PID "actualPID"
Now the port is clear for you to run Java or NodeJS or any application through 8080 port if you are looking to do that. (http://localhost:8080)