Thursday 3 December 2015

(Solved) Windows Service Stuck At Stopping How To Kill

In order to avoid having to reboot a server in the middle of the day and  kill a service which is stuck at stopping
You can do the following steps:

Step 1. Find the Service Name.

Go to services and double click on the service which has stuck.  Note down the “Service Name”.

Step 2. Find the PID of the service.

Run command prompt as administrator and type in:
sc queryex servicename
("servicename" is the name of the service you obtained from the earlier step.)
Note down the PID

Step 3. Kill the PID

Type following command in the command prompt (as administrator):
taskkill /f /pid [PID]
Note1: Be careful of what process you are killing though.  If you kill some critical windows service you may end up forcing the machine to reboot on it own.
Note1: By forcing a service to stop you can also use these instructions to Kill a Windows Service which is stuck at starting as well.  This will help you in restarting service also.

Enjoy!

No comments:

Post a Comment