Monday, June 27, 2011

Powershell - List Programs installed on Remote Computer

Now we COULD just use a GET-WMIOBJECT Win32_Product to query installed applications but that’s only good for applications registered via the MSI (Windows Installer)

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()
}

No comments: