One day I have installed the windows service using developer command line tool. Service is installed successfully. After that I tried to start the service from command prompt, suddenly it got stuck at starting.
At that time, I thought to kill the process using command line because I cannot reboot the server.
Step 1: First of all you need to find the service name which has stuck at starting state
Navigate to
Run >> type Services.msc
It will open the Services window, find the installed windows service which has stuck at starting state and click on it and note down the name of service.
Step 2: Now open the command prompt and type the below command
> sc queryex ServiceName
It will result as below and note down the PID.
Step 3: From command prompt type the below command to kill the service using PID
>taskkill /f /pid 11140
Enjoy SharePoint!!!