get pid of running port code example Example 1: how to know pid of a port netstat -aon | find "9999" Example 2: how to know pid of a port taskkill /F /PID 15776