Simplistic way of getting memory statistics

      No Comments on Simplistic way of getting memory statistics

# $Author: berrydejager $
# $Rev: 1.0 $
#
# Version control:
#
# 1.0 Initial version

#
# Functions definitions
#

Function GetFreeMem
{
Param([string]$ComputerName)
Write-host “————————————————————————————”
Write-host “- START SCANNING $Computername —————————————————”
Write-host “————————————————————————————”
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName . | Format-Table -Property TotalVirtualMemorySize,TotalVisibleMemorySize,FreePhysicalMemory,FreeVirtualMemory,FreeSpaceInPagingFiles
Write-host “————————————————————————————”
Write-host “- END SCANNING $Computername —————————————————–”
Write-host “————————————————————————————”
Write-Host ” ”
Write-Host ” ”
}
###
### Start of Main Routine
###

clearGetFreeMem SERVER001
GetFreeMem SERVER002
GetFreeMem SERVER003

###
### End of Main Routine
###

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.