Skip to content

Instantly share code, notes, and snippets.

@brianfgonzalez
Created February 28, 2020 15:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brianfgonzalez/6b2ed0760d3f3000a57be030ea1fde46 to your computer and use it in GitHub Desktop.
Save brianfgonzalez/6b2ed0760d3f3000a57be030ea1fde46 to your computer and use it in GitHub Desktop.
Quick snippet to output a grid of all uninstall strings from the registry.
$ColRegUinst = @()
(Get-Item -Path 'HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall').GetSubKeyNames() |
%{
if ( (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("DisplayName") -ne $null)
{
$ObjRegUinst = New-Object System.Object
$ObjRegUinst | Add-Member -Type NoteProperty -Name Publisher -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("Publisher")
$ObjRegUinst | Add-Member -Type NoteProperty -Name Name -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("DisplayName")
$ObjRegUinst | Add-Member -Type NoteProperty -Name Uninstall -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("UninstallString")
$ColRegUinst += $ObjRegUinst
}
}
$ColRegUinst | Out-GridView
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment