2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Powershell】Windows Update 一覧取得コマンド

Last updated at Posted at 2020-10-19

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

参考:Hey, Scripting Guy!

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?