SC Delete Not Deleting Service

Drew picture Drew · Sep 26, 2013 · Viewed 18.6k times · Source

So I'm running Windows Server 2008 R2 Standard and am trying to delete a service with 'sc delete <myservicesname>' and the command seems to execute without complaint, however, when I check the services list after running the command, the service is still there.

Any ideas?

Answer

Brian Witt picture Brian Witt · May 1, 2014

sc in PowerShell is Set-Content; so if you are running in PowerShell, you likely have a file called 'delete' with your service's name as its content

If this is indeed your issue, use

sc.exe delete servicename