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