Windows – Command “wmic memphysical get maxcapacity” gives wrong number

windows 7wmic

I have been using my laptop with 16G (8gx2) memory for a long time, I can use all of 16G memory without any problem, but ran wmic memphysical get maxcapacity today shows however 8388608 (8G), apparently wrong, what's wrong with the command? More importantly, is there a way to get the right number?

Best Answer

MaxCapacity is in kilobytes.

Here is the source documentation.

The documentation is confusing but this is what I think.

Documentation

It says that MaxCapacity is:

Maximum memory size (in bytes) installable for this particular memory array. If the size is unknown, the property is given a value of 0 (zero).

However, MaxCapacity also has a DEPRECATED qualifier, which is defined like so:

Deprecated

Data type: CIM_BOOLEAN

Applies to: properties, classes

Indicates the property has been superseded by another property.

MaxCapacityEx has the same definition:

Maximum memory size (in bytes) installable for this particular memory array. If the size is unknown, the property is given a value of 0 (zero).

But also specifies that the units are

Units ("kilobytes")

Use Case

When I use the command wmic memphysical get MaxCapacity, I get the result 16777216.

1677216 bytes is 16 Mb

1677216 kilobytes is 16 Gb

16 Mb just doesn't make any sense. Therefore, it's probably returning kilobytes.

Your Max Capacity per slot

8388608 kilobytes is 8 Gb

Use the command wmic memphysical get MaxCapacity, MemoryDevices to see the Maximum Capacity for each slot and the number of slots you have on your motherboard.

My output is:

MaxCapacity  MemoryDevices
16777216     2