Public/Get-WinRamInfo.ps1

1
2
3
4
5
6
7
8
9
10
11
12
<#
.SYNOPSIS
    Help you do day to day Windows Management task.
.DESCRIPTION
    This module will have some of the most common Windows Management task as functions.
.EXAMPLE
Get-WinRamInfo
#>

function Get-WinRamInfo {
    $totalRam = (Get-CimInstance -ClassName 'Cim_PhysicalMemory' | Measure-Object -Property Capacity -Sum).Sum
    return $totalRam; 
}