Returns information about the physical memory installed on a computer.

JavaScript
Edit|Remove
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20;

   var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");
   var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PhysicalMemory", "WQL",
                                          wbemFlagReturnImmediately | wbemFlagForwardOnly);

   var enumItems = new Enumerator(colItems);
   for (; !enumItems.atEnd(); enumItems.moveNext()) {
      var objItem = enumItems.item();

      WScript.Echo("BankLabel: " + objItem.BankLabel);
      WScript.Echo("Capacity: " + objItem.Capacity);
      WScript.Echo("Caption: " + objItem.Caption);
      WScript.Echo("Creation Class Name: " + objItem.CreationClassName);
      WScript.Echo("Data Width: " + objItem.DataWidth);
      WScript.Echo("Description: " + objItem.Description);
      WScript.Echo("Device Locator: " + objItem.DeviceLocator);
      WScript.Echo("Form Factor: " + objItem.FormFactor);
      WScript.Echo("Hot Swappable: " + objItem.HotSwappable);
      WScript.Echo("Install Date: " + objItem.InstallDate);
      WScript.Echo("Interleave Data Depth: " + objItem.InterleaveDataDepth);
      WScript.Echo("Interleave Position: " + objItem.InterleavePosition);
      WScript.Echo("Manufacturer: " + objItem.Manufacturer);
      WScript.Echo("Memory Type: " + objItem.MemoryType);
      WScript.Echo("Model: " + objItem.Model);
      WScript.Echo("Name: " + objItem.Name);
      WScript.Echo("Other Identifying Info: " + objItem.OtherIdentifyingInfo);
      WScript.Echo("Part Number: " + objItem.PartNumber);
      WScript.Echo("Position In Row: " + objItem.PositionInRow);
      WScript.Echo("Powered On: " + objItem.PoweredOn);
      WScript.Echo("Removable: " + objItem.Removable);
      WScript.Echo("Replaceable: " + objItem.Replaceable);
      WScript.Echo("Serial Number: " + objItem.SerialNumber);
      WScript.Echo("SKU: " + objItem.SKU);
      WScript.Echo("Speed: " + objItem.Speed);
      WScript.Echo("Status: " + objItem.Status);
      WScript.Echo("Tag: " + objItem.Tag);
      WScript.Echo("Total Width: " + objItem.TotalWidth);
      WScript.Echo("Type Detail: " + objItem.TypeDetail);
      WScript.Echo("Version: " + objItem.Version);
      WScript.Echo();
   }