$strComputer = Read-Host "Enter Computer Name" $colSlots = Get-WmiObject -Class "win32_PhysicalMemoryArray" -namespace "root\CIMV2" -computerName $strComputer $colRAM = Get-WmiObject -Class "win32_PhysicalMemory" -namespace "root\CIMV2" -computerName $strComputer $totRAM = 0 "Computer Name: " + $strComputer Foreach ($objSlot In $colSlots){ "Total Number of DIMM Slots: " + $objSlot.MemoryDevices } Foreach ($objRAM In $colRAM) { "Memory Installed: " + $objRAM.DeviceLocator "Memory Size: " + ($objRAM.Capacity / 1GB) + " GB" "Part Number: " + $objRAM.PartNumber $totRAM += $objRAM.Capacity } "Total RAM: " + ($totRAM / 1GB) + " GB"