Sunday, 30 November 2008

Get-FreeMemory.ps1

# Get-FreeMemory.ps1
#
Sample using PowerShell
#
1st sample from http://msdn.microsoft.com/en-us/library/aa394587
#
Thomas Lee

$mem = Get-WmiObject -Class Win32_OperatingSystem

# Display memory
"System : {0}" -f $mem.csname
"Free Memory: {0}" -f $mem.FreePhysicalMemory



This script produces the following output:



PS C:\foo> .\get-freememory.ps1
System : COOKHAM8
Free Memory: 2776988

1 comment:

lee woo said...

Forgiving does not erase the bitter past. A healed memory is not a deleted memory. Instead, forgiving what we cannot forget creates a new way to remember. We change the memory of our past into a hope for our future. See the link below for more info.


#memory
www.matreyastudios.com