{"id":4673,"date":"2007-08-27T08:57:24","date_gmt":"2007-08-27T00:57:24","guid":{"rendered":"https:\/\/www.alfredivy.per.sg\/blogger\/?p=4673"},"modified":"2019-08-03T11:22:03","modified_gmt":"2019-08-03T03:22:03","slug":"have-you-heard-of-the-command-sc","status":"publish","type":"post","link":"https:\/\/www.alfredivy.sg\/blogger\/2007\/08\/have-you-heard-of-the-command-sc\/","title":{"rendered":"Have you heard of the command SC?"},"content":{"rendered":"\n<p>Most of us are familiar with the famous NET command since the Windows NT days.  The NET command to handle network services is part of the NTLM and LAN Manager coming from the days of MS-DOS.  <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Now we have Windows 2003 and the NET command doesn&#8217;t quite make it, as it does not show the service properties completely.  <\/p>\n\n\n\n<p>Enter the SC command.<\/p>\n\n\n\n<p>From the Microsoft website:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>&#8220;Communicates with the Service Controller and installed services. SC.exe retrieves and sets control information about services. You can use SC.exe for testing and debugging service programs. Service properties stored in the registry can be set to control how service applications are started at boot time and run as background processes. &#8220;<\/p><\/blockquote>\n\n\n\n<p>From my Windows XP computer, when I type SC in a command window:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>DESCRIPTION:         SC is a command line program used for communicating with the         NT Service Controller and services. USAGE:         sc  [command] [service name]  &#8230; <\/p><cite>         <br>The option  has the form &#8220;\\\\ServerName&#8221;<br>         Further help on commands can be obtained by typing: &#8220;sc [command]&#8221;<br>         Commands:<br>           query&#8212;&#8212;&#8212;&#8211;Queries the status for a service, or<br>                           enumerates the status for types of services.<br>           queryex&#8212;&#8212;&#8212;Queries the extended status for a service, or<br>                           enumerates the status for types of services.<br>           start&#8212;&#8212;&#8212;&#8211;Starts a service.<br>           pause&#8212;&#8212;&#8212;&#8211;Sends a PAUSE control request to a service.<br>           interrogate&#8212;&#8211;Sends an INTERROGATE control request to a service.<br>           continue&#8212;&#8212;&#8211;Sends a CONTINUE control request to a service.<br>           stop&#8212;&#8212;&#8212;&#8212;Sends a STOP request to a service.<br>           config&#8212;&#8212;&#8212;-Changes the configuration of a service (persistant<br>           description&#8212;&#8211;Changes the description of a service.<br>           failure&#8212;&#8212;&#8212;Changes the actions taken by a service upon failur<br>           qc&#8212;&#8212;&#8212;&#8212;&#8211;Queries the configuration information for a servic<br>           qdescription&#8212;-Queries the description for a service.<br>           qfailure&#8212;&#8212;&#8211;Queries the actions taken by a service upon failur<br>           delete&#8212;&#8212;&#8212;-Deletes a service (from the registry).<br>           create&#8212;&#8212;&#8212;-Creates a service. (adds it to the registry).<br>           control&#8212;&#8212;&#8212;Sends a control to a service.<br>           sdshow&#8212;&#8212;&#8212;-Displays a service&#8217;s security descriptor.<br>           sdset&#8212;&#8212;&#8212;&#8211;Sets a service&#8217;s security descriptor.<br>           GetDisplayName&#8211;Gets the DisplayName for a service.<br>           GetKeyName&#8212;&#8212;Gets the ServiceKeyName for a service.<br>           EnumDepend&#8212;&#8212;Enumerates Service Dependencies.<br>         The following commands don&#8217;t require a service name:<br>         sc              boot&#8212;&#8212;&#8212;&#8212;(ok | bad) Indicates whether the last boot should                           be saved as the last-known-good boot configuration           Lock&#8212;&#8212;&#8212;&#8212;Locks the Service Database           QueryLock&#8212;&#8212;-Queries the LockStatus for the SCManager Database EXAMPLE:         sc start MyService<br> Would you like to see help for the QUERY and QUERYEX commands? [ y | n ]: <\/cite><\/blockquote>\n\n\n\n<p>This looks really interesting as I have a server migrated using Server Migration Pack &#8211; Physical to ProLiant Edition.  The services don&#8217;t start properly, especially RPC Server, Network Connections, Workstation and Server.<\/p>\n\n\n\n<p>In addition, I can&#8217;t view the detail entries in the Event Viewer and the properties of the services in Services MMC.<\/p>\n\n\n\n<p>SC has a query module to list the properties of the services.  Perhaps the above mentioned critical services got their Logon Account messed up and I can use SC to fix this.<\/p>\n\n\n\n<p>More details later<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of us are familiar with the famous NET command since the Windows NT days. The NET command to handle network services is part of the NTLM and LAN Manager coming from the days of MS-DOS.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"class_list":["post-4673","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/comments?post=4673"}],"version-history":[{"count":1,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4673\/revisions"}],"predecessor-version":[{"id":4674,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4673\/revisions\/4674"}],"wp:attachment":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/media?parent=4673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/categories?post=4673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/tags?post=4673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}