functions/setup/Get-Uninstall.ps1
function Get-Uninstall { $Isx86 = ([IntPtr]::Size -eq 4) if ($Isx86) { $UninstallRegistyPath = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' } else { $UninstallRegistyPath = @( 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' ) } Get-ItemProperty $UninstallRegistyPath | . { process{ if ($_.DisplayName -and $_.UninstallString) { $_ } }} | Select-Object DisplayName, DisplayVersion, UninstallString | Sort-Object DisplayName } |