windows shutdown -i ports used code example
Example: how to shutdown port in windows
netstat -ano | findstr < Port Number >
taskkill /F /PID < Process Id >
netstat -ano | findstr < Port Number >
taskkill /F /PID < Process Id >