How to get list of "view installed updates" in "programs and features" in control panel using Powershell?

Viewed 849

Trying to get all installed updates (including updates of third party apps like Acrobat etc.) which can be seen by clicking "view installed updates" in "programs and features" in control panel.

Below methods didn't help, probably because they are limited to Microsoft/Windows only:

New-Object -ComObject Microsoft.Update.Session
Get-WmiObject Win32_QuickfixEngineering

Example: I want to get KB2565063 from attached image below

Thanks

2 Answers

I found the following options:

$x = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -like "*foo*" }
$y = Get-ItemProperty HKLM:\SOFTWARE\Classes\Installer\Dependencies\* | Where-Object {$_.DisplayName -like "*foo*" }

In $x you have the software from "Uninstall a program" and in $y you have the update from "Installed Updates".

I'm not very happy with it, I'd like to know how windows actually link $x and $y together without searching simply for the name.

Maybe someone can fix the missing part for us :-)

EDIT

I found the solution:

Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.ParentDisplayName -like "*foo*" }

This returns an object where ParentDisplayName is your program and DisplayVersion is the update version.

I'm assuming you want packages with the msu provider:

get-package -ProviderName msu


Name                           Version          Source                     ProviderName
----                           -------          ------                     ------------
Update for Microsoft Defend...                                             msu
Security Intelligence Updat...                                             msu
Security Intelligence Updat...                                             msu
Related