How to Remove a Windows Service
We decommissioned an older application and for the clean-up phase we had to delete the Windows Services for this application. Uninstalling the services took longer than expected, even if it should be a straightforward action.
Attention: Deleting a Windows Service is a lot simpler than reinstalling it. Therefore, make sure that you delete the right service!
These steps should help you to remove a Windows Service without any troubles:
- Find the name of the Windows Service by opening the Services tab in the Task Manager. Go to the service you no longer need, open the properties, and copy the name.
- Open a command line with administrator privileges and run this command:
Or if you use PowerShell:
Easy, what could possibly go wrong? A lot as it turns out.
If you try the PowerShell command on a Windows Server, you may find out that you run the wrong version of PowerShell. The Remove-Service cmdlet was introduced in PowerShell 6.0, that may not be available for your server version.
If you try the sc delete command, you may run into permission problems. Should this be the case, close the terminal and open it again with administrator privileges. Sometimes Windows Server opens the terminal but "forgets" the additional permissions.
If you moved around those obstacles, you should be able to remove the Windows Service without any further delays.