Kale Davis / 47 posts / 53 comments / feed / comments feed

Killing Windows Services that hang on ‘STOPPING’

Although rare, sometimes a Windows Service can hang while stopping or restarting. This happened to me yesterday on one of my SharePoint servers and thought I would write-up a quick note in case I ever need it again. In my case the Office SharePoint Search Service had stopped responding and when I tried to restart the service it hung on ‘STOPPING’. A reboot would of fixed it, but that isn’t an option for a production server usually.

First, find the service name:

Next you can use the SC command with queryex to find the PID for that service and then use taskkill to kill the service:

Couple notes – the /F flag is for forcing the service to stop. Try it first without the /F. A service hanging on ‘STOPPING’ is usually a bad sign, so you may want to figure out why this is happening before doing this.

1 Comment

  1. Kamlesh — February 4, 2010 #

    Thats a great tip. I guess, there are some interesting tools provided by SystemInternals to do such tasks too.

    http://technet.microsoft.com/en-us/sysinternals/default.aspx

Leave a comment