How do I get just the list of names from a command?

Include just the name in the Select-Object command:

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName | Format-Table -AutoSize

There are two registry keys which contain programs installed.

Registry key to get installed Apps: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

and Registry key for 32-bit application on a 64-bit operating system. HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

You can create a ForEach loop to get the dot property 'DisplayName' of each app then add to an array before sorting for unique names $array = $row = $Location = $Reg = $null

    $Location =  'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
                 'Registry::HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
    
    ForEach ($Reg in $Location) {
    $row = (Get-ItemProperty -Path $Reg).DisplayName
    $array = $array + $row
    }
    $array | Sort-Object -Unique

There may be other registry locations where a program has been installed and is only available to specific user(s) other than all users or current user.

Tags:

Powershell