Below is the code snippet i tried but having an error because of it can anyone helpme in editing this one
$colItems4 = Get-WMIObject -class Win32_PhysicalMemory | Measure-Object -Property capacity -Sum |
foreach ($objItem4 in $colItems4 )
{
write-host "Total Physical Ram : " $objItem4.Sum
}