We are developing a application which is based on SOA. We are maintaing PowerShell scripts and batch files to Install/Uninstall and Start/Stop the services.
But in certain cases (especially when the Powershell script is updated and user doesn't run the previous script to uninstall service) the services still remains and doesn't get uninstalled.
For this there is a simple command.
1. Run Visual Studio Command Prompt (Run as administrator)
2. write the following code
sc delete <servicename>
Note : You can get the name of the service from the properties of the service