I am a newbie in powershell script. I want to uninstall a service on remote machine and re-install it again. I am able to stop the service, change the files that service is using and again start it. But, now I want to completely uninstall it.
One more thing, I will be executing these scripts via TeamCity.
I have tried following ways, but each one is giving trouble:
- using wmi class
- running installutil command on remote machine. But, cant execute this on remote machine since there is problem in accessing that service.
- Using Get-WmiObject command and then calling delete() on retrieved service.
Is there any promising solution ?? Any help will be appreciable..