Nov 242016
 

$Session = New-Object -ComObject « Microsoft.Update.Session »
$Searcher = $Session.CreateUpdateSearcher()
$historyCount = $Searcher.GetTotalHistoryCount()
$Searcher.QueryHistory(0, $historyCount) | Select-Object Date,
@{name= »Operation »; e={switch($_.operation){
1 {« Installation »}; 2 {« Uninstallation »}; 3 {« Other »}}}},
@{name= »Status »; e={switch($_.resultcode){
1 {« In Progress »}; 2 {« Succeeded »}; 3 {« Succeeded With Errors »}; 4 {« Failed »}; 5 {« Aborted »}}}},
@{name= »KB »;E={$_.title.split(« (« )[1].split(« ) »)[0]} },
Title | Export-Csv -NoType « $Env:userprofile\Desktop\Windows Updates.csv »
Source : https://social.technet.microsoft.com/wiki/contents/articles/4197.how-to-list-all-of-the-windows-and-software-updates-applied-to-a-computer.aspx

 

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)