Search code examples
powershellguiduninstallation

Uninstall a product from powershell


How to uninstall a product using the guid of the product

I tried this

msiexec /x {guid}

But i cant uninstall the product

It worked fine when i use

Wmic product where identifyingnumber={guid} call uninstall

Solution

  • $WMI = Get-WmiObject win32_product -Filter 'IdentifyingNumber = "{guid}"'
    $WMI.Uninstall()