# Get-PhysicalRAM.ps1
# Sample using PowerShell
# 3rd sample from http://msdn.microsoft.com/en-us/library/aa394587
# Thomas Lee
$mem = Get-WmiObject -Class Win32_ComputerSystem
# Display memory
"This system has {0} MB Free Memory" -f $($mem.TotalPhysicalMemory/1mb)
PS C:\foo> .\Get-PhysicalRAM
This system has 8188.7421875 MB Free Memory
No comments:
Post a Comment