Skip to content

Instantly share code, notes, and snippets.

@alicraigmile
Created April 16, 2014 21:22
Show Gist options
  • Save alicraigmile/10934412 to your computer and use it in GitHub Desktop.
Save alicraigmile/10934412 to your computer and use it in GitHub Desktop.
How much memory does this Windows workstation have?
#GetMemory
strComputer = "."
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")
For Each wbemObject In wbemObjectSet
WScript.Echo "Total Physical Memory (kb): " & wbemObject.TotalPhysicalMemory
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment