The “Win32_PhysicalMemory” class is your friend here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
PS> gwmi win32_physicalmemory | ft BankLabel,Capacity,Speed,DeviceLocator BankLabel Capacity Speed DeviceLocator --------- -------- ----- ------------- Bank 1 2147483648 667 S1 Bank 2 1073741824 667 S2 # show size in GB PS> gwmi win32_physicalmemory | ft BankLabel,@{Name="Capacity"; Expression= {$_.Capacity/1GB}},Speed,DeviceLocator BankLabel Capacity Speed DeviceLocator --------- -------- ----- ------------- Bank 1 2 667 S1 Bank 2 1 667 S2 |
And to get the total number of slots in the machine as well as the maximum supported RAM, “Win32_PhysicalMemoryArray” is your friend.
1 2 3 4 5 |
PS> gwmi win32_physicalmemoryarray | ft MemoryDevices,MaxCapacity -Auto MemoryDevices MaxCapacity ------------- ----------- 2 4194304 |
Both classes have more properties than the ones I filtered for above.