Skip to content

Published: May 22, 2016 | Applies to:

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!

SHARE: Facebook Google+ Twitter

Leave a Reply

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

What's New

Recent Comments

  • Kapil Arya : ^^ If you're on Windows 10 RT, you can try this fix....

    3 hours ago

  • Faiz : Experiencing same issue in windows Mobile , Any Solution??...

    4 hours ago

  • Kwin : Thank you sooooooooooo much!...

    4 hours ago

  • Kapil Arya : ^^ I appreciate your feedback, thanks for writing back!...

    8 hours ago

  • Kapil Arya : ^^ This is exactly what described in FIX 1, then why doesn't...

    8 hours ago