CMD command to delete service under Windows

List:
C:\WINDOWS\system32> SC delete MSSQL$SQLEXPRESS
[SC] DeleteService successful
explain:
SC is a command line program used to communicate with the service control manager and services.
Usage:
sc <server> [command] [service name] <option1>...
Command:
query-------------Query the status of a service, or enumerate the status of a service type.
queryex---------Query the extended status of a service, or enumerate the status of a service type.
start------------Start the service.
pause------------Sends a PAUSE control request to the service.
interrogate-----Sends an INTERROGATE control request to the service.
continue---------Send a CONTINUE control request to the service.
stop------------Sends a STOP request to the service.
config------------ Change the configuration of the service (permanently).
description-----Change the description of the service.
failure--------- Changes the action the service performs on failure.
failureflag-----Change the failure operation flag of the service.
sidtype---------Change the service SID type of the service.
privs------------Change the required privileges for the service.
managedaccount--Change the service to mark the service account password as managed by the LSA.
qc------------- Query the configuration information of the service.
qdescription----The description of the query service.
qfailure------- The action to be performed by the service when the query fails.
qfailureflag----The failure operation flag of the query service.
qsidtype-------Query the service SID type of the service.
qprivs-------Query the required privileges of the service.
qtriggerinfo----Query the trigger parameters of the service.
qpreferrednode--The preferred NUMA node for the query service.
qmanagedaccount - Query whether the service uses an account with LSA-managed passwords.
qprotection-----Query the process protection level of the service.
quserservice----Query the local instance of the user service template.
delete ------------ (from the registry) delete the service.
create------------ Creates the service (and adds it to the registry).
control------- Sends control to the service.
sdshow------------ Displays the security descriptor of the service.
sdset------------ Set the security descriptor of the service.
showsid---------Displays the service SID string corresponding to any name.
triggerinfo-----Configure the trigger parameters of the service.
preferrednode---Sets the preferred NUMA node for the service.
GetDisplayName--Get the DisplayName of the service.
GetKeyName------Get the ServiceKeyName of the service.
EnumDepend------Enumerates service dependencies.
Example:
sc start MyService

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325592461&siteId=291194637