{"id":37,"date":"2015-03-15T03:40:19","date_gmt":"2015-03-14T16:40:19","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=37"},"modified":"2022-11-14T20:05:46","modified_gmt":"2022-11-14T09:05:46","slug":"how-to-kill-a-windows-service-which-is-stuck-at-stopping","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/how-to-kill-a-windows-service-which-is-stuck-at-stopping\/","title":{"rendered":"How to Kill a Windows Service which is stuck at stopping"},"content":{"rendered":"<p><span style=\"line-height: 1.5em\">Sometimes as an <a href=\"https:\/\/4it.com.au\" target=\"_blank\" rel=\"noopener noreferrer\">IT Support<\/a> administrator you may need to kill a service which is stuck at stopping in order to avoid having to reboot a server in the middle of the day.<\/span><\/p>\n<p>Here&#8217;s what you need to do:<\/p>\n<h2>Step 1. Find out the Service Name<\/h2>\n<p>To do this, go in to services and double click on the service which has stuck. \u00a0Make a note of the &#8220;Service Name&#8221;.<\/p>\n<h2>Step 2. Find out the PID of the service<\/h2>\n<p>Open an elevated command prompt and type in:<\/p>\n<p><code>sc queryex servicename<\/code><\/p>\n<p>(where <strong>servicename<\/strong> is the name of the service you obtained from Step 1.)<\/p>\n<p><strong>Make note of the PID<\/strong><\/p>\n<h2>Step 3. Kill the PID<\/h2>\n<p>From the same command prompt type in:<\/p>\n<p><code>taskkill \/f \/pid [PID]<\/code><\/p>\n<p>Where [PID] is the service number.<\/p>\n<p><strong>If it is successful you should receive the following message:<\/strong><\/p>\n<p>SUCCESS: The process with PID XXXX has been terminated.<\/p>\n<p>Be careful of what you are killing though. \u00a0If you kill a critical windows service you may end up forcing the machine to reboot on it own.<\/p>\n<p><em>Note: By forcing a service to stop you can also use these instructions to Kill a Windows Service which is stuck at starting as well. \u00a0This will allow you to restart the service.<\/em><\/p>\n<h2>Video Tutorial &#8211; How to Kill A Service which is Stuck at Stopping<\/h2>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>Sometimes as an IT Support administrator you may need to kill a service which is stuck at stopping in order to avoid having to reboot a server in the middle of the day. Here&#8217;s what you need to do: Step 1. Find out the Service Name To do this, go in to services and double [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[9],"article-tag":[12,331,332,109,108,10,406,330,110],"class_list":["post-37","article","type-article","status-publish","format-standard","hentry","article-category-windows-commands","article-tag-command-prompt","article-tag-force-kill-service-windows","article-tag-force-service-to-stop","article-tag-how-to-kill-a-windows-service-stuck-stopping","article-tag-how-to-kill-a-windows-service-thats-stuck-on-stopping-or-starting","article-tag-kill-service","article-tag-kill-service-stuck-stopping","article-tag-restart-a-service-that-is-stopping","article-tag-windows-service-stuck-in-stopping-state"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":509,"sum_votes":2478},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/37\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=37"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}