ibi icon

show_update_install_history.ps1

ibi | PRO | 11/14/16 08:10:40 AM UTC | 0 ⭐ | 612 👁️ | Never ⏰ | []
PowerShell |

490 B

|

None

|

0 👍

/

0 👎

# what: lists installed windows updates (via com)
# who: ibi c/o doctordeploy.com
# whose: CC BY-SA 4.0
 
$Session = New-Object -ComObject "Microsoft.Update.Session"
$Searcher = $Session.CreateUpdateSearcher()
$historyCount = $Searcher.GetTotalHistoryCount()
 
$Searcher.QueryHistory(0, $historyCount) | Select-Object date, title | sort date -descending | ft -autosize 
# add "| tee c:\temp\output.log" to redirect output to file
 
# alternatives:
# [PS] Get-Hotfix
# [CMD] wmic qfe list brief

Comments