how to stop any app if running in localhost code example Example: stop localhost server netstat -ano | findstr :yourPortNumber tskill typeyourPIDhere