Stop a Windows service stuck at stopping

Home / Stop a Windows service stuck at stopping

Stopping a Windows service might not always work as expected. In this case, you might want to force the service to stop.

A service stuck at stopping won’t normally react to a net stop command:

Some services may take a while to stop. But if you are sure that the service is stuck, you have to kill it.

Open the services add-in (Start > run > services.msc) and search the service to stop. Double click on the service to open the properties. Remember the name “Service name”.

The next steps requires a command prompt (Start > cmd.exe). Depending on your system settings, you have to open it as administrator (right-click the start menu entry and select “Run as administrator”).

Enter sc queryex <servicename> and press enter.

This example show the Windows Update service (wuauserv). In this example the service is running (state) and the important information is the PID (3544 in this image).

Now enter taskkill /PID <your pid> /f

This will kill the process for the service:

Now the service has been stopped and can restart or reconfigure it.

 

You can use this tutorial to remotely kill a stuck service: Use PSEXEC to execute the commands above. You can replace the services.msc step with the command sc query to get a list of all services on the target system.