This script gives you a clean, deduplicated list of all installed software on your Windows machine.
- The first line gets a list of installed software from the Windows registry (for 64-bit apps), selecting only the name, version, publisher, and install date.
- The second line adds installed 32-bit software (on 64-bit Windows) from a different registry path, with the same fields.
- The third line:
- Filters out entries with no display name,
- Sorts the list by display name and removes duplicates,
- Exports the result to a CSV file at e:\temp\SOFTWARE.csv using UTF-8 encoding.
$INSTALLED = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate
$INSTALLED += Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate
$INSTALLED | ?{ $_.DisplayName -ne $null } | sort-object -Property DisplayName -Unique | Export-Csv e:\temp\SOFTWARE.csv -Encoding UTF8