Monday, June 09, 2008

How to get the Physical Memory size of a remote computer

Using 2 lines of PowerShell to get the Physical memory of a remote computer :

$mem = Get-WmiObject win32_computersystem -computername server-vm-0001

$mem.totalphysicalmemory / 1Gb

This is just an example, and other system information can be retrieved through using the WMI objects, the above script can be easily extended to get the Physical memory (or anything) for all the machines in a whole network.

No comments: