Functions/Get-InstalledPrograms.ps1


function Get-InstalledPrograms {
    [CmdletBinding()]
    param (
        # [Parameter()] [string] $ParameterName
    )

    $Installed1 = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
    $Installed2 = Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*

    $Installed = $Installed1 + $Installed2

    $Installed = $Installed | Where-Object DisplayName

    $Installed = $Installed | Select-Object PSChildName, DisplayName, DisplayVersion, Publisher, InstallDate, UninstallString

    $Installed = $Installed | Sort-Object DisplayName

    return $Installed

}