Hi,
Trying to get a script to map the correct physical ram...
I can use the below but its a 1mb short on some systems (even with the
extra 1 mb)
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
Output.WriteLine "Total Physical Memory: " &
objComputer.TotalPhysicalMemory /1024\1024+1 & "MB"
Next
I could also use
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_PhysicalMemory")
For Each objItem in colItems
Wscript.Echo "Capacity: " & objItem.Capacity /1024\1024
Next
This does list the ram correctly however on a system with multiple
sticks of ram it lists the sticks separately.
Is there a command which will give me the total amount of ram (on every
system) without listing the sticks separetely?
Many Thanks