free port in windows 10 code example Example: kill service by port number on windows taskkill /F /PID PORT_NUMBER