16

I want to find and uninstall a Windows service.

How can I accomplish this using a PowerShell script?

Gareth
  • 19,080
sarat
  • 1,536

1 Answers1

26
(Get-WmiObject Win32_Service -filter "name='<service_name>'").Delete()

For more information:
Get-WmiObject
Delete method of the Win32_Service class

Indrek
  • 24,874