PowerShellを使って物理メモリの情報を取得する †PowerShellを使って、メモリの製造元やメモリデバイスの種類などを取得することができます。 Get-WmiObject Win32_PhysicalMemory †Get-WmiObjectコマンドレットを使用して、メモリの情報を簡単に取得することができます。 Get-WmiObject Win32_PhysicalMemory †以下の構文により、メモリ情報を取得することができます。 Get-WmiObject Win32_PhysicalMemory 実行例 PS C:\Users\Sakura> Get-WmiObject Win32_PhysicalMemory __GENUS : 2 __CLASS : Win32_PhysicalMemory __SUPERCLASS : CIM_PhysicalMemory __DYNASTY : CIM_ManagedSystemElement __RELPATH : Win32_PhysicalMemory.Tag="Physical Memory 0" __PROPERTY_COUNT : 36 __DERIVATION : {CIM_PhysicalMemory, CIM_Chip, CIM_PhysicalComponent, CIM_PhysicalElement...} __SERVER : MIIX3 __NAMESPACE : root\cimv2 __PATH : \\MIIX3\root\cimv2:Win32_PhysicalMemory.Tag="Physical Memory 0" Attributes : 0 BankLabel : BANK 0 Capacity : 2147483648 Caption : 物理メモリ ConfiguredClockSpeed : 1333 ConfiguredVoltage : CreationClassName : Win32_PhysicalMemory DataWidth : 32 Description : 物理メモリ DeviceLocator : DIMM0 FormFactor : 12 HotSwappable : InstallDate : InterleaveDataDepth : 0 InterleavePosition : 0 Manufacturer : To be filled by O.E.M MaxVoltage : MemoryType : 24 MinVoltage : Model : Name : 物理メモリ OtherIdentifyingInfo : PartNumber : To be filled by O.E.M PositionInRow : PoweredOn : Removable : Replaceable : SerialNumber : To be filled by O.E.M SKU : SMBIOSMemoryType : 24 Speed : 1333 Status : Tag : Physical Memory 0 TotalWidth : 32 TypeDetail : 128 Version : PSComputerName : MIIX3 メモリの枚数を調べる †マシンにメモリが何枚挿してあるかを調べるには、以下の構文可能です。 Get-WmiObject Win32_PhysicalMemory | Measure-Object 実行例 PS C:\Users\Sakura> Get-WmiObject Win32_PhysicalMemory | Measure-Object Count : 1 Average : Sum : Maximum : Minimum : Property : メモリ情報を表形式で表示してみる †以下のようにFormat-Tableコマンドレットを使用して、表示したい項目を指定すれば表形式で表示することができます。 PS C:\Users\Sakura> Get-WmiObject Win32_PhysicalMemory | Format-Table BankLabel,Capacity,ConfiguredClockSpeed,DataWidth,DeviceLocator,Manufacturer BankLabel Capacity ConfiguredClockSpeed DataWidth DeviceLocator Manufacturer --------- -------- -------------------- --------- ------------- ------------ BANK 0 2147483648 1333 32 DIMM0 To be filled by O.E.M 以上、PowerShellを使ってメモリの情報を取得する方法でした。 |