Created
November 10, 2017 00:56
-
-
Save jimmyca15/8dbc65fe4a078e47419d814ace8e25f4 to your computer and use it in GitHub Desktop.
List installed products on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$UninstallKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" | |
$reg = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("$UninstallKey") | |
$products = @() | |
foreach ($name in $reg.GetSubKeyNames()) { | |
$product = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("$UninstallKey\$name") | |
$products += $product.GetValue("DisplayName") | |
$product.Dispose() | |
} | |
$reg.Dispose() | |
$products | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment