{"id":5142,"date":"2012-10-03T11:23:00","date_gmt":"2012-10-03T11:23:00","guid":{"rendered":""},"modified":"2026-04-18T22:47:08","modified_gmt":"2026-04-18T22:47:08","slug":"verify-windows-service-status-from-command-line","status":"publish","type":"post","link":"https:\/\/hellem.org\/wblog\/?p=5142","title":{"rendered":"Verify Windows service status from command line"},"content":{"rendered":"<p>The command to use is <strong><a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/bb490995.aspx\">sc<\/a><\/strong>. First you need to know that every service has a display name and a service name. I banged my head into the wall until I realized that I could just type <code class=\"codespan\">sc query<\/code> to list all. Actually I typed <code class=\"codespan\">sc query &gt;&gt; result.txt<\/code><br \/>\nThen I found the real name of the IBM HTTP Server 6.1-service and I could type<br \/>\n<!-- codeblock lang=\"\" --><\/p>\n<pre><code>\r\nD:\\HTTPServer61\\bin&gt;sc query IBMHTTPServer6.1\r\nSERVICE_NAME: IBMHTTPServer6.1\r\n        TYPE               : 10  WIN32_OWN_PROCESS\r\n        STATE              : 4  RUNNING\r\n                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))\r\n        WIN32_EXIT_CODE    : 0  (0x0)\r\n        SERVICE_EXIT_CODE  : 0  (0x0)\r\n        CHECKPOINT         : 0x0\r\n        WAIT_HINT          : 0x0\r\n<\/code><\/pre>\n<p><!-- \/codeblock --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The command to use is sc. First you need to know that every service has a display name and a service name. I banged my head into the wall until I realized that I could just type sc query to list all. Actually I typed sc query &gt;&gt; result.txt Then I found the real name [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"class_list":["post-5142","post","type-post","status-publish","format-standard","hentry","category-work-geek"],"_links":{"self":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/5142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5142"}],"version-history":[{"count":1,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/5142\/revisions"}],"predecessor-version":[{"id":12480,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/5142\/revisions\/12480"}],"wp:attachment":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}