Windows Update 一覧取得
検証環境
・Windows10
Component Based Servicing(CBS)経由でアップデートした一覧のみ取得
cmd
wmic qfe
PowerShell
Get-Hotfix
全てのアップデートを取得
PowerShell
# Microsoft Update Session オブジェクトのインスタンスを作成
$Session = New-Object -ComObject Microsoft.Update.Session
# Update Searcher オブジェクトを作成
$Searcher = $Session.CreateUpdateSearcher()
# システムに適用された更新プログラムの合計数を取得
$HistoryCount = $Searcher.GetTotalHistoryCount()
# QueryHistory(開始点,終了点)メソッドで開始点から終了点までの更新プログラムを取得
$Searcher.QueryHistory(0,$HistoryCount) | Select-Object Date,Title,Operation,HResult