How do I uninstall a Windows service using a PowerShell script?

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

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

Share:
33,581

Related videos on Youtube

sarat
Author by

sarat

A guy who lives in the intersection of technology and humanity!

Updated on September 18, 2022

Comments

  • sarat
    sarat over 1 year

    I want to find and uninstall a Windows service.

    How can I accomplish this using a PowerShell script?