Profile picture
Sidharth R
  • Home
  • Posts
  • Journal
  • Home
  • Posts
  • Journal
  • Search

Kill Any Process Using a Port in Powershell

Updated: 08 Apr 2026 ⚬ Page views: loading...

Recently I wanted to start a server in port 1234 & I got an error telling that some other process is using it.

Here is a one-liner you can use to kill an existing process bound to a port.

Stop-Process -Id (Get-NetTCPConnection -LocalPort 8899).OwningProcess -Force

Nerdsid.com

Links
  • Home
  • Contact
  • About
  • Posts
  • Journal
  • Quotes
  • Notes
  • Style guide
© 2026 Sidharth R.
All content on this website is licensed under CC BY-NC-SA 4.0.