PowerShell list installed third party application update -
is there powershell command return list of installed non-microsoft application updates? example: after installing softwarea , installing update softwarea -> 1 can see installed update in control panel - view installed updates section there powershell command or simple script return true if update installed or false if update not installed?
try , replace program name string program. use wildcards narrow down program name. expected output uninstall string last write time. making assumption last write time of files changing when there's patch.
$programname = "notepad++*" $32bit = get-itemproperty hklm:\software\wow6432node\microsoft\windows\currentversion\uninstall\* $64bit = get-itemproperty hklm:\software\microsoft\windows\currentversion\uninstall\* $programs = $32bit + $64bit foreach ($program in $programs){ $program = write-output $program | displayname -like $programname if ($program.displayname -ne $null) { $lastmodified = (get-item $program.uninstallstring).lastwritetime $properties = @{ programname = $program.displayname publisher = $program.publisher version = $program.displayversion uninstallstring = $program.uninstallstring lastmodified = $lastmodified } $obj = new-object -typename psobject -property $properties write-output $obj } }
Comments
Post a Comment