Public/Find-specInstalledProgram.ps1
function Find-specInstalledProgram { [cmdletBinding()] param( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string]$Name ) Begin { $regPaths = @( 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall' ) } Process { foreach ($path in $regPaths) { if (Test-Path $path) { Get-ChildItem $path | ForEach-Object { $program = Get-ItemProperty $_.PsPath if ($program.DisplayName -like $Name) { [pscustomobject]@{ DisplayName = $program.DisplayName DisplayVersion = $program.DisplayVersion Publisher = $program.Publisher InstallDate = $program.InstallDate UninstallString = $program.UninstallString } } } } } } } |