PowerShell Script To Return The Local Machines Installed Memory In Megabytes

 

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"

 

Published Sunday, October 28, 2007 8:36 AM by dhite
Filed under:

Comments

# re: PowerShell Script To Return The Local Machines Installed Memory In Megabytes

$ram=WmiObject Win32_ComputerSystem

"Installed Memory: " + ($ram.TotalPhysicalMemory/1MB) + "MB"

Is easier

Monday, October 29, 2007 8:03 AM by cert