If you cannot stop a service and looking forward to kill it, here's how to force stop a Windows Service using Command Prompt in Windows 10/8.1/8/7.

Being a Windows Server Administrator, you certainly have several responsibilities towards the job. You need to be in control of the things in order to keep running everything smoothly. Even a trivial possibility of anything going wrong should be dealt with utter diligence.

Now, during a normal day at work, you might come across a stubborn Windows Service which is stuck at starting/stopping state since what seems like an eternity. At such a moment of crisis, you would want to make a decision of killing the service in order to avoid rebooting the server in middle of the noontide.

Considering the normal case scenario, any service could hang, be it a deadlock situation or the resource limitation. Although, it might frequently happen in application services such as Microsoft Exchange (POP3 and IMAP). You can use the TaskKill command to terminate the culprit service and avoid the reboot mechanism in middle of business hours.

Here’s how to do so :

How To Force Stop A Windows Service Using Command Prompt In Windows 10/8.1/8/7

1. Press W8K + R and type services.msc in the Run dialog box, hit Enter key to open Services snap-in.

How To Force Stop A Service Using Command Prompt Windows 10

2. Now on the right side pane of Services, search for the service by its name. For instance, if you are looking for Microsoft Passport service, find it by scrolling down to the corresponding name and double-click it.

How To Force Stop A Service Using Command Prompt Windows 10

3. In the service property sheet shown below, note down Service Name on the top in General tab. Remember this name as it will be used to find its PID (Process ID) and kill the task. You can see here that I can’t stop the Microsoft Passport service, as the Stop button is not active.

How To Force Stop A Service Using Command Prompt Windows 10

4. Open administrative Command Prompt and type this command after substituting the <SERVICENAME> with actual service name you noticed in step 3.

sc queryex <SERVICENAME>

5. From the results of the above query, make a note of PID.

How To Force Stop A Service Using Command Prompt Windows 10

6. On the same Command Prompt window, type the following, where PID is the Process ID you just copied, and hit Enter.

taskkill /f /pid PID

How To Force Stop A Service Using Command Prompt Windows 10

This will kill the culprit service forcibly and put it on rest. In case you later need to start the service, you can do it simply from service property sheet shown in step 3.

That’s it!

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Comments

  • Kapil Arya : ^^ Try all commands from this article: http://www.kapilarya.com/fix-wi...

    9 hours ago

  • Kapil Arya : ^^ What error you received?...

    9 hours ago

  • Kapil Arya : ^^ Akshat, refer this fix: https://www.kapilarya.com/the-process-canno...

    9 hours ago

  • Steve : This failed to work for me either. Everything seemed to work but the ...

    19 hours ago

  • Subrata : I use lenovoB490 win7 laptop. I get the error 0xc000000f, I follow you...

    24 hours ago