Skip to content

Instantly share code, notes, and snippets.

@NiceRath
Last active November 12, 2025 10:15
Show Gist options
  • Save NiceRath/5c9dd78672b3b60da0b419c7df4e9724 to your computer and use it in GitHub Desktop.
Save NiceRath/5c9dd78672b3b60da0b419c7df4e9724 to your computer and use it in GitHub Desktop.
Get List of installed Programs on Windows via Powershell
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