This simple PowerShell script will return the local machines Installed memory in Megabytes.
PS1 Script:
$strComputer = $Host
Clear
$RAM = WmiObject Win32_ComputerSystem
$MB = 1048576
"Installed Memory: " + [int]($RAM.TotalPhysicalMemory /$MB) + " MB"
$ram=WmiObject Win32_ComputerSystem
"Installed Memory: " + ($ram.TotalPhysicalMemory/1MB) + "MB"
Is easier