16

I want to find and uninstall a Windows service.

How can I accomplish this using a PowerShell script?

Gaff
  • 18,569
  • 15
  • 57
  • 68
sarat
  • 1,506
  • 3
  • 17
  • 21

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,204
  • 14
  • 90
  • 93