talatham
6/12/2013 - 2:39 PM

List all Windows Updates on the current machine.

List all Windows Updates on the current machine.

$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$HistoryCount = $Searcher.GetTotalHistoryCount()
$Searcher.QueryHistory(1,$HistoryCount) | 
  Select-Object Date, Title, Description