During the start of service hung on starting position as you can see below image. Waited some time but service was in the same state. None of the options were highlighted to stop/start/restart service.
Now the only option available to forcefully kill this service by the process id on the Windows system. Below instructions will help you with it.
- 1. Find the Service name – Right click on service and open properties. Here you will find service name under the General tab. For example, view the below screenshot.
In my case the service name is AmazonSSMAgent
- 2. Find the PID – Then execute the below command with the service name identified above.
sc queryex [servicename]
This will show you the details of the service on the console as below.
- 3. Kill Process by PID – Find out the PID (process id) of the service and force kill process by using the below command. Use pid number found with the previous command.
taskkill /pid [pid number] /f
All done. You can now start your service now.