Sc.exe: Service Controller Tool Topics | Next
sc [\\ServerName] Command ServiceName [OptionName=OptionValue...]
Where:
Command | Description |
---|---|
Config | Changes the configuration of a service (persistent). |
Continue | Sends a CONTINUE control request to a service. |
Control | Sends a control to a service. |
Create | Creates a service (adds it to the registry). |
Delete | Deletes a service (from the registry). |
Description | Changes the description of a service. |
EnumDepend | Enumerates service dependencies. |
Failure | Changes the actions taken by a service upon failure. |
GetDisplayName | Gets the display name for a service. |
GetKeyName | Gets the name of the registry key for a service. |
Interrogate | Sends an INTERROGATE control request to a service. |
Pause | Sends a PAUSE control request to a service. |
Qc | Queries configuration for the service. To find out the name of the binary for any service and whether it shares a process with other services, run sc qc ServiceName. |
Qdescription | Queries the description of a service. |
Qfailure | Queries the actions taken by a service upon failure. |
Query | Queries the status for a service, or enumerates the status for types of services. |
QueryEx | Queries the status and extended information for a service, or enumerates the status and extended information for types of services. |
SdShow | Displays a service's security descriptor using SDDL. |
SdSet | Sets a service's security descriptor using SDDL. |
Start | Starts a service. |
Stop | Sends a STOP request to a service. |
The following commands don't require a service name. Their syntax is:
sc [ServerName] Command [OptionName=OptionValue...]
Command | Description |
---|---|
Boot | Values are {ok | bad} Indicates whether the last restart should be saved as the last-known-good restart configuration |
Lock | Locks the Service Database |
QueryLock | Queries the LockStatus for the SCManager Database |
sc GetKeyName DisplayName
sc Command
where Command is a valid command name as listed above.sc Command
where Command is a valid command name as listed above.To display help information for a command, use the following command prompt syntax:
sc Command
where Command is a valid command name as listed above.
The exceptions are the Query and QuerytEx commands, which cause SC to list the status of all running services. For help on the Query and QueryEx commands, run the command sc, and at the prompt "Would you like to see help for the QUERY and QUERYEX commands?" type y.