How Much RAM Do You Have?

by Jun 9, 2010

Ever wondered what type of RAM your PC uses and if there is a bank available to add more? Ask WMI! This example also converts the cryptic type codes into clear-text using hashtables to create new columns:

$memorytype = "Unknown", "Other", "DRAM", "Synchronous DRAM", "Cache DRAM",
"EDO", "EDRAM", "VRAM", "SRAM", "RAM", "ROM", "Flash", "EEPROM", "FEPROM",
$formfactor = "Unknown", "Other", "SIP", "DIP", "ZIP", "SOJ", "Proprietary",
"QFP", "TQFP", "SOIC", "LCC", "PLCC", "BGA", "FPBGA", "LGA"
$col1 = @{Name='Size (GB)'={ $_.Capacity/1GB } }
$col2 = @{Name='Form Factor'={$formfactor[$_.FormFactor]} }
$col3 = @{Name='Memory Type'={ $memorytype[$_.MemoryType] } }

Get-WmiObject Win32_PhysicalMemory | Select-Object BankLabel, $col1, $col2, $col3

Twitter This Tip! ReTweet this Tip!