Monthly Archives: November 2017

VBS – Installed RAM

The below snippet of vbs is used to query WMI for the amount of ram installed on a pc. For a remote device, change strComputer to the hostname of the target computer.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings 
 Wscript.Echo "System Name: " & objComputer.Name
 Wscript.Echo "Total Physical Memory: " & objComputer.TotalPhysicalMemory

Taken from: