Reading Installed Software from Registry

by Nov 10, 2015

Here is a very quick way of finding installed software. The Get-Software function reads both the 32- and 64-bit locations for software installed for all users.

#requires -Version 1

function Get-Software


    $keys = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 
    Get-ItemProperty -Path $keys | 
      Where-Object { $_.DisplayName } |
      Select-Object -Property DisplayName, DisplayVersion, UninstallString |
      Where-Object { $_.DisplayName -like $DisplayName } |
      Where-Object { $_.UninstallString -like $UninstallString }

It even comes with filtering parameters, so when you specify -DisplayName or -UninstallString (or both), you can easily filter the results to only the software products you are looking for. Both parameters support wildcards.

Here is a sample call that dumps all Office components to a grid view window:

Get-Software -DisplayName *Office* | Out-GridView

Twitter This Tip! ReTweet this Tip!