LoginSignup
0
0

More than 3 years have passed since last update.

PowerShellでのシステム情報取得

Posted at

ハードウェアなど、システム情報をあれこれ取得することがあるかと思います。
PowerShellにてWMI Win32クラスを参照することでいろいろと情報が取得可能となります。

基本文型

GetSysteminfo.ps1
   Get-CimInstance -ClassName Win32クラス

例:インストール済みの修正プログラムの一覧表示

Get-CimInstance -ClassName QuickFixEngineering

Source        Description      HotFixID      InstalledBy          InstalledOn               
------        -----------      --------      -----------          -----------               
              Update           KB4601050     NT AUTHORITY\SYSTEM  2021/04/19 0:00:00        
              Update           KB4562830                          2020/11/18 0:00:00        
              Security Update  KB4570334                          2020/11/18 0:00:00        
              Security Update  KB4580325                          2020/11/19 0:00:00        
              Security Update  KB4586864                          2020/11/19 0:00:00        
              Update           KB4594440                          2020/11/19 0:00:00        
              Security Update  KB5001405     NT AUTHORITY\SYSTEM  2021/04/15 0:00:00   

主なWin32Class

 1.ハードウェア関係
 ・Win32_BIOS:BIOS情報の取得
 ・Win32_Processor:CPU情報の取得
 ・Win32_ActiveRoute:ルーティング情報の表示
 ・Win32_ComputerSystem:コンピューターの製造元および型番の一覧表示
 ・Win32_BaseBoard:マザーボード情報の一覧表示

 2.システム関係
 ・Win32_QuickFixEngineering:インストール済みの修正プログラムの一覧表示
 ・Win32_Environment:システム環境の表示
 ・Win32_UserProfile:ユーザプロファイル情報の一覧表示

※参考サイト:
Microsoft コンピューターに関する情報の収集
WMI Fun!!
 ※WMI win32 classについて記載あり。

0
0
1

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