netstat -ano | findstr kill port in window code example Example: stop localhost server netstat -ano | findstr :yourPortNumber tskill typeyourPIDhere