-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetMemory.ps1
More file actions
11 lines (9 loc) · 975 Bytes
/
getMemory.ps1
File metadata and controls
11 lines (9 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
$computername = 'localhost'
$memorytype = "Unknown", "Other", "DRAM", "Synchronous DRAM", "Cache DRAM", "EDO", "EDRAM", "VRAM", "SRAM", "RAM", "ROM", "Flash", "EEPROM", "FEPROM", "EPROM", "CDRAM", "3DRAM", "SDRAM", "SGRAM", "RDRAM", "DDR", "DDR-2"
$formfactor = "Unknown", "Other", "SIP", "DIP", "ZIP", "SOJ", "Proprietary", "SIMM", "DIMM", "TSOP", "PGA", "RIMM", "SODIMM", "SRIMM", "SMD", "SSMP", "QFP", "TQFP", "SOIC", "LCC", "PLCC", "BGA", "FPBGA", "LGA"
$col1 = @{Name='Size (GB)'; Expression={ $_.Capacity/1GB } }
$col2 = @{Name='Form Factor'; Expression={$formfactor[$_.FormFactor]} }
$col3 = @{Name='Memory Type'; Expression={ $memorytype[$_.MemoryType] } }
$col4 = @{Name='ComputerName'; Expression=[Scriptblock]::Create("'$computername'")}
Get-WmiObject Win32_PhysicalMemory -computername $computername |
Select-Object BankLabel, $col1, $col2, $col3, $col4