Reading Installed Software (Part 1)

by Dec 18, 2020

The Get-ItemProperty cmdlet can read registry values in a much more powerful way than most users know. The cmdlet supports multiple registry paths, and it supports wildcards. This way, it takes only a one-liner to read all installed software (plus their uninstall strings) from four registry keys:

# list of registry locations where installed software is stored
$paths = 
# all users x64
# all users x86
# current user x64
# current user x86

Get-ItemProperty -ErrorAction Ignore -Path $paths |
    # eliminate all entries with empty DisplayName
    Where-Object DisplayName |
    # select some properties (registry values)
    Select-Object -Property DisplayName, DisplayVersion, UninstallString, QuietUninstallString

Twitter This Tip! ReTweet this Tip!