Uninstall Application

|

First step is to get the application information

Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name like '%Outlook%'"
Get-WmiObject -Class Win32_Product | Where-Object {     $_.Name -match "Outlook" }

Either option will display information similar to this

IdentifyingNumber : {90140000-001A-0409-0000-0000000FF1CE}
Name              : Microsoft Office Outlook MUI (English) 2010
Vendor            : Microsoft Corporation
Version           : 14.0.7015.1000
Caption           : Microsoft Office Outlook MUI (English) 2010

To uninstall this application can be done with either query but essentially is like this

$app = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name like '%Outlook%'"
$app.Uninstall()
$app = Get-WmiObject -Class Win32_Product | Where-Object {     $_.Name -match "Outlook" }
$app.Uninstall()
Originally Posted on September 5, 2014
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.