kill pid on port windows code example Example: kill process on port windows netstat -ano | findstr "PORT_NUMBER" taskkill /PID PORT_NUMBER /f