Windows – Remove Windows service from command line

serviceswindows

I would like to do this because I have a half installed service because of installation failure which is just there, non-functioning.

How can I delete the Windows service using the command line?

Best Answer

NOTE: You'll likely need an elevated command prompt (right click => "Run as Administrator") to execute this command

the sc command is what you want, specifically sc delete

C:\Users\Jeff>sc delete
DESCRIPTION:
        Deletes a service entry from the registry.
        If the service is running, or another process has an
        open handle to the service, the service is simply marked
        for deletion.
USAGE:
        sc  delete [service name]