Created
February 28, 2020 15:57
-
-
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.
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
$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