Site icon Winhelponline

How to Find the RAM type (DDR2, DDR3, DDR4), Speed, and other Details in Windows

This post explains two different ways to find full information about the Memory module installed in your system, without using 3rd party tools. You may need the existing Memory module information such as the type, part number, number of available slots, capacity, and speed if you plan to upgrade the RAM.

Determine the Memory Module Information Quickly

Using Task Manager

Start Task Manager, select the Performance tab, and click Memory.

This tab lists the available and used memory along with memory chip information such as the module capacity, speed, type, and the number of available slots.


Memory Type, part number, speed, etc using WMIC

The Windows Management Instrumentation is an extremely useful tool to view hardware information and automate system tasks. You can use WMI’s command-line tool (WMIC) to view memory chip information. Open a Command Prompt window and type:

wmic memorychip get | clip

This copies the memory module information to the clipboard, which you can paste in Notepad or any text editor of choice.

The following properties of your Memory module are shown using the above command. However, the data for some fields/properties show up empty.

If you need only specific data required in order to purchase a new module, you’d run this command:

wmic memorychip get banklabel, manufacturer, partnumber, speed, MemoryType, SMBIOSMemoryType, devicelocator

That shows the Manufacturer Name, Part Number, Memory type, Socket Name, speed of the memory chip.

The most important field is the Memory type. It’s indicated in CIM values. A value of 20 means DDR, 21 is DDR2, 22 is DDR2 FB-DIMM, 24 is DDR3, 26 is DDR4.

For DDR4 and higher, you may have to use the SMBIOSMemoryType field, since the MemoryType column shows 0.

MemoryType shows up as 0 (Unknown)?

If you have DDR4 (and higher) RAM installed on your system, the WMIC command-line may show the memory type as 0. However, you can rely on the SMBIOSMemoryType data.

Microsoft documentation says DDR4 is 26 (0x1A).

Memory Type/SMBIOSMemoryType RAM Type
20 DDR
21 DDR2
22 DDR2 FB-DIMM
24 DDR3
26 DDR4

In addition, there are other fields such as the part number, speed, etc., that can help you find the RAM module type.

The DeviceLocator field tells you the label of the socket in the System board that holds the memory, such as DIMM1, DIMM2, DIMM 3, and DIMM4.

This MSDN page has all the details about WMI’s physicalmemory class.

Part Number is another useful information that can help when purchasing memory chip online; you can look up the Part Number on the web or on your favorite shopping site.

You don’t always need a module of the exact same Part Number. The memory chip from any manufacturer should work fine, provided the specifications match.


Using PowerShell

The following PowerShell script (via SuperUser) shows the list of available DIMM slots, form factor, type, and speed.

# Based on System Management BIOS (SMBIOS) Reference Specification 3.4.0a
# https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0a.pdf

# 7.18.1. Form factor @offset 0x0E
[string[]]$FORM_FACTORS = @(
'Invalid', 'Other', 'Unknown', 'SIMM', # 00-03h
'SIP', 'Chip', 'DIP', 'ZIP' # 04-07h
'Proprietary Card', 'DIMM', 'TSOP', 'Row of chips', # 08-0Bh
'RIMM', 'SODIMM', 'SRIMM', 'FB-DIMM', # 0C-0Fh
'Die' # 10h
)
# 7.18.2. Memory type @offset 0x12
[string[]]$MEMORY_TYPES = @(
'Invalid', 'Other', 'Unknown', 'DRAM', # 00-03h
'EDRAM', 'VRAM', 'SRAM', 'RAM', # 04-07h
'ROM', 'FLASH', 'EEPROM', 'FEPROM', # 08-0Bh
'EPROM', 'CDRAM', '3DRAM', 'SDRAM', # 0C-0Fh
'SGRAM', 'RDRAM', 'DDR', 'DDR2', # 10-13h
'DDR2 FB-DIMM', 'Reserved', 'Reserved', 'Reserved', # 14-17h
'DDR3', 'FBD2', 'DDR4', 'LPDDR', # 18-1Bh
'LPDDR2', 'LPDDR3', 'LPDDR4', 'Logical non-volatile device' # 1C-1Fh
'HBM (High Bandwidth Memory)', 'HBM2 (High Bandwidth Memory Generation 2)',
'DDR5', 'LPDDR5' # 20-23h
)
# 7.18.3. Type detail @offset 0x13
[string[]]$TYPE_DETAILS = @(
'Reserved', 'Other', 'Unknown', 'Fast-paged', # bit 0-3
'Static column', 'Pseudo-static', 'RAMBUS', 'Synchronous', # bit 4-7
'CMOS', 'EDO', 'Window DRAM', 'Cache DRAM', # bit 8-11
'Non-volatile', 'Registered (Buffered)',
'Unbuffered (Unregistered)', 'LRDIMM' # 0C-0Fh
)

function lookUp([string[]]$table, [int]$value)
{
if ($value -ge 0 -and $value -lt $table.Length) {
$table[$value]
} else {
"Unknown value 0x{0:X}" -f $value
}
}

function parseTable([array]$table, [int]$begin, [int]$end)
{
[int]$index = $begin
$size = [BitConverter]::ToUInt16($table, $index + 0x0C)
if ($size -eq 0xFFFF) {
"Unknown memory size"
} elseif ($size -ne 0x7FFF) {
if (($size -shr 15) -eq 0) { $size *= 1MB } else { $size *= 1KB }
} else {
$size = [BitConverter]::ToUInt32($table, $index + 0x1C)
}
"Size: {0:N0} bytes ({1} GB)" -f $size, ($size/1GB)

$formFactor = $table[$index + 0x0E]
$formFactorStr = $(lookUp $FORM_FACTORS $formFactor)
"Memory form factor: 0x{0:X2} {1}" -f $formFactor, $formFactorStr

$type = $table[$index + 0x12]
"Memory type: 0x{0:X2} ({1})" -f $type, $(lookUp $MEMORY_TYPES $type)

$typeDetail = [BitConverter]::ToUInt16($table, $index + 0x13)
$details = 0..15 |% {
if (((1 -shl $_) -band $typeDetail) -ne 0) { "{0}" -f $TYPE_DETAILS[$_] }
}
"Type detail: 0x{0:X2} ({1})" -f $typeDetail, $($details -join ' | ')

$speed = [BitConverter]::ToUInt16($table, $index + 0x15)
if ($speed -eq 0) {
"Unknown speed"
} elseif ($speed -ne 0xFFFF) {
"Speed: {0:N0} MT/s" -f $speed
} else {
"Speed: {0:N0} MT/s" -f [BitConverter]::ToUInt32($table, $index + 0x54)
}
"======================="
}

$index = 0

$END_OF_TABLES = 127
$MEMORY_DEVICE = 17

$BiosTables = (Get-WmiObject -ComputerName . -Namespace root\wmi -Query `
"SELECT SMBiosData FROM MSSmBios_RawSMBiosTables" `
).SMBiosData

do
{
$startIndex = $index

# ========= Parse table header =========
$tableType = $BiosTables[$index]
if ($tableType -eq $END_OF_TABLES) { break }

$tableLength = $BiosTables[$index + 1]
# $tableHandle = [BitConverter]::ToUInt16($BiosTables, $index + 2)
$index += $tableLength

# ========= Parse unformatted part =========
# Find the '\0\0' structure termination
while ([BitConverter]::ToUInt16($BiosTables, $index) -ne 0) { $index++ }
$index += 2

# adjustment when the table ends with a string
if ($BiosTables[$index] -eq 0) { $index++ }

if ($tableType -eq $MEMORY_DEVICE) { parseTable $BiosTables $startIndex $index }
} until ($tableType -eq $END_OF_TABLES -or $index -ge $BiosTables.length)

Read-Host -Prompt "Press Enter to exit"

(Another option is to use the VBScript RAM Upgrade.vbs written by someone named “Alex Yancey” and hosted on GitHub. Also, there are some excellent third-party tools such as HWiNFO and Speccy which show a wealth of information about the hardware installed in your computer.)

Exit mobile version