Advertisement
ibi

show_update_install_history.ps1

ibi
Nov 14th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # what: lists installed windows updates (via com)
  2. # who: ibi c/o doctordeploy.com
  3. # whose: CC BY-SA 4.0
  4.  
  5. $Session = New-Object -ComObject "Microsoft.Update.Session"
  6. $Searcher = $Session.CreateUpdateSearcher()
  7. $historyCount = $Searcher.GetTotalHistoryCount()
  8.  
  9. $Searcher.QueryHistory(0, $historyCount) | Select-Object date, title | sort date -descending | ft -autosize
  10. # add "| tee c:\temp\output.log" to redirect output to file
  11.  
  12. # alternatives:
  13. # [PS] Get-Hotfix
  14. # [CMD] wmic qfe list brief
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement