How to get all details from Installed Updates Window

Jay Panchal picture Jay Panchal · Apr 21, 2016 · Viewed 20.2k times · Source

Installed Updates Window - On windows 10 Enterprise

I want to get all of this information (including non-windows updates) in any text format... Please share if you have any way to fetch these infos. For more details please see attached image...

Answer

Kirill Pashkov picture Kirill Pashkov · Apr 21, 2016

Try this way:

$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$HistoryCount = $Searcher.GetTotalHistoryCount()
$Updates = $Searcher.QueryHistory(0,$HistoryCount)
$Updates |  Select Title,@{l='Name';e={$($_.Categories).Name}},Date