Last active
November 12, 2025 10:15
-
-
Save NiceRath/5c9dd78672b3b60da0b419c7df4e9724 to your computer and use it in GitHub Desktop.
Get List of installed Programs on Windows via Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-InstalledApps { | |
| param ( | |
| [Parameter(ValueFromPipeline=$true)] | |
| [string[]]$comps = $env:COMPUTERNAME | |
| ) | |
| foreach ($comp in $comps) { | |
| $keys = '','\Wow6432Node' | |
| foreach ($key in $keys) { | |
| $apps = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$comp).OpenSubKey("SOFTWARE$key\Microsoft\Windows\CurrentVersion\Uninstall").GetSubKeyNames() | |
| foreach ($app in $apps) { | |
| $program = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$comp).OpenSubKey("SOFTWARE$key\Microsoft\Windows\CurrentVersion\Uninstall\$app") | |
| $name = $program.GetValue('DisplayName') | |
| if ($name) { | |
| New-Object PSObject -Property @{ | |
| 'DisplayName' = $name | |
| 'DisplayVersion' = $program.GetValue('DisplayVersion') | |
| 'Publisher' = $program.GetValue('Publisher') | |
| 'InstallDate' = $program.GetValue('InstallDate') | |
| 'UninstallString' = $program.GetValue('UninstallString') | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| $apps = get-installedapps | |
| # write-output $apps | |
| $apps = get-installedapps | |
| $is_installed = $apps | ?{ $_.DisplayName -eq "<APP TO FIND>" } | |
| if ($is_installed.Length -eq 0) { | |
| write-output "not installed" | |
| } else { | |
| write-output "already installed" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment