We are using a badly written windows service, which will hang when we are trying to Stop it from code. So we need to find which process is related to that service and kill i
Microsoft/SysInternals has a command-line tool called PsKill that allows you to kill a process by name. This tool also allows you to kill processes on other servers. Windows SysInternals
Usage: pskill [-t] [\computer [-u username [-p password]]]
-t Kill the process and its descendants.
-u Specifies optional user name for login to remote computer.
-p Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.