LoginSignup
1
0

More than 1 year has passed since last update.

WMIを使用したWindowsUpdateListの一覧出力

Posted at

Wmicコマンドとは

WMI(Windows Management Instrumentation)コマンドはシステム管理に関する様々なハードウェア情報やソフトウェアといったシステム情報から、CPU稼働率などの動的な情報を取得、管理するためのコマンドです。
Windows2000以降では標準機能としてWindowsに実装されているようですが、近年ではWindowsPowerShellへ置き換わられており、非推奨となっています。

InstallされたWindows Update FileのExport

Windows Update Fileの一覧をExportする必要があり、やり方を調べました。

コマンド

以下はhtml形式でInstallされたWindows updateの一覧を出力できます。

html形式
wmic qfe /format:htable > File名.html
csv形式
wmic qfe /format:csv > File名.csv 

Command Lineは非推奨とのことで、PowerShellでも出力できるか確認しました。

html形式
get-hotfix | convertto-html -Property 列名 | out-file File名.html  
csv形式
get-hotfix | export-csv File名.csv

Property数は異なりますが、同じようなデータを取得できました。

1
0
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
1
0