This code reads system information for a remote machine through WMI
Prerequisites: Remote machine address, username and password
"" "" "" "" "" "" "" "" "" "" "" "" "" "" ' "" '
gettotalphysicalmemory
'
Discover "'" ' "." How much more RAM (MB) in computer ' ', ' ' "'" ' "'" ' "' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Gettotalphysicalmemory (Host, UserName, Password)
Dim objcomputer, Colcomputer
Dim intrammb
Set SWbemLocator = CreateObject ("WbemScripting.SWbemLocator")
Set objWMIService = Swbemlocator.connectserver (Host, " Root\cimv2 ", UserName, Password)
Set colcomputer = objWMIService.ExecQuery (" SELECT * from Win32_ComputerSystem ") C10/>for each objcomputer in colcomputer
intrammb = Int ((objcomputer.totalphysicalmemory)/1048576) +1
Next< C13/>gettotalphysicalmemory = Intrammb End
Function
Call
TotalPhysicalMemory = Gettotalphysicalmemory (Irshost, Irsusername, Irspassword)
To learn more, please read: http://www.computerperformance.co.uk/vbscript/wmi_memory.htm