Service hangs on ‘Stopping’

0

Posted by James | Posted in Windows Server | Posted on 10-09-2010

Sometimes you’ll find it is necessary to stop a service in Windows, but using the normal GUI method fails as the service gets stuck on ‘Stopping’ and never stops. When this happens, you are unable to start the service again. This happened to a client today with their Websense Filter Service, and here’s how we resolved it – the same method works for other services too.

Bring up a command prompt and use the command ‘sc queryex’ – this will display a list of services. Find the one that you need, and make a note of the PID number – in this case 1552.

Showing the PID of the service using sc queryex command

Now you know the PID, you can kill the process using taskkill as shown below.

Killing the service using taskkill

The /F switch forces the command – you can try without first, but usually if you’ve got to this stage you’ll need to force it.

Hope this helps!

Write a comment