Get Physical RAM installed on a computer


posted by Thomas Lee
11-29-2008

Downloads: 617
File size: 275 B
Views: 6,705

Embed
Get Physical RAM installed on a computer
  1. # Get-PhysicalRAM.ps1 
  2. # Sample using PowerShell 
  3. # 3rd sample from http://msdn.microsoft.com/en-us/library/aa394587 
  4. # Thomas Lee 
  5.  
  6. $mem = Get-WmiObject -Class Win32_ComputerSystem 
  7.  
  8. # Display memory 
  9. "This system has {0} MB Free Memory" -f $($mem.TotalPhysicalMemory/1mb) 
This script used teh Win32_ComputerSystem script displays the amount of physical ram installed on the computer. This is a MSDN Sample recoded using PowerShell
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.