kill specific port windows code example
Example 1: kill service by port number on windows
taskkill /F /PID PORT_NUMBER
Example 2: close all localhost connections
netstat -ano | findstr :yourPortNumber
taskkill /PID typeyourPIDhere /F
taskkill /F /PID PORT_NUMBER
netstat -ano | findstr :yourPortNumber
taskkill /PID typeyourPIDhere /F