Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.

Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.

To retrieve a list of installed programs using PowerShell, you can use the following methods:

Method 1: Using Get-Package

This cmdlet is designed to retrieve installed software packages.

Get-Package  Where-Object {$_.ProviderName -eq "Programs"}  Select-Object Name, Version

This command filters the results to only show programs and then selects the Name and Version properties.

Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.

Method 2: Using Get-ItemProperty from the Registry

Installed programs are typically listed in the Windows Registry.

Get-ItemProperty HKLM:SoftwareWow6432NodeMicrosoftWindowsCurrentVersionUninstall  Select-Object DisplayName, DisplayVersion, Publisher  Where-Object {$_.DisplayName -ne $null}

For 64-bit systems, you might need to check the Wow6432Node. This retrieves the DisplayName, DisplayVersion, and Publisher for each installed program.

Get-ItemProperty HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall  Select-Object DisplayName, DisplayVersion, Publisher  Where-Object {$_.DisplayName -ne $null}

This command checks the standard Uninstall registry key.

Method 3: Combining Registry Locations

To ensure you get a comprehensive list, you can combine both registry locations:

$regPath = @(

"HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall",

Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.

"HKLM:SoftwareWow6432NodeMicrosoftWindowsCurrentVersionUninstall"

$installedPrograms = foreach ($path in $regPath) {

Get-ItemProperty $path Select-Object DisplayName, DisplayVersion, Publisher

$installedPrograms Where-Object {$_.DisplayName -ne $null}

Method 4: Using Get-WmiObject (Win32_Product) - Slower

This method uses WMI (Windows Management Instrumentation) but can be slower and might not list all installed applications, especially those installed per-user.

Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.
Get-WmiObject -Class Win32_Product  Select-Object Name, Version, Vendor

Example Output

The output will vary based on the installed programs, but a typical result might look like:

DisplayName        DisplayVersion   Publisher

----------- -------------- ---------

Microsoft Edge 123.45.6789.0 Microsoft Corporation

Google Chrome 123.4.5678.90 Google LLC

Is using powershell get list of installed programs hard? Not with this easy step-by-step guide.

Considerations

  • Permissions: You might need to run PowerShell as an administrator to access all registry keys.
  • Per-User Installations: Some programs are installed per-user and might not be listed in the HKLM registry keys. You'd need to check HKCU (HKEY_CURRENT_USER) as well.
  • Speed: Get-WmiObject can be significantly slower than registry-based methods.
Share this article: