Reference: http://www.energizedtech.com/2010/09/powershell-list-programs-insta.html
Function to uninstall a program:
function uninstallapp ($x) {
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "$x"
}
$app.Uninstall()
}
function uninstallapp ($x) {
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "$x"
}
$app.Uninstall()
}
No comments:
Post a Comment