find port number of a service running code example Example: find which service is using port netstat -aon | findstr tasklist | findstr 9260