Get-WmiObject -Class Win32_OperatingSystem -ComputerName $servername | Select-Object @{Name="TotalVisibleMemorySize (GB)";Expression={"{0:N1}"
-f (($_.TotalVisibleMemorySize)/1024/1024)}}, @{Name="FreePhysicalMemory (GB)";Expression={"{0:N1}"
-f (($_.FreePhysicalMemory)/1024/1024)}}, @{Name="MemoryUsage %";Expression={ "{0:N2}"
-f ((($_.TotalVisibleMemorySize - $_.FreePhysicalMemory)*100)/
$_.TotalVisibleMemorySize) }} | Format-List
No comments:
Post a Comment