How to find the RAM type (DDR2/DDR3) of the system using command prompt?

I have tried SYSTEMINFO in command prompt but it did not display the RAM type.

  • Do you know the model of your motherboard? If not, see this superuser.com/questions/175213/… then look up the manual to find out! – Dave Jun 11 '13 at 14:03
  • 2
    There is very likely a good duplicate on SU, but the one marked is definitely NOT a duplicate. – music2myear Jan 31 '18 at 20:13
  • Agreed. A couple of the “answers” to that other question are actually answers to this question; i.e., they were posted in the wrong place. In particular, @terdon’s lshw answer to the other question might make a valuable addition to this thread (except for the fact that it’s Linux-centric, and this question is about Windows). But the linked question is not a duplicate of this one. – Scott Oct 21 '18 at 17:19

You can use the wmic command to find out the information about your memory:

wmic MemoryChip get BankLabel, Capacity, MemoryType, TypeDetail, Speed

The MemoryType returns the type of your Memory: 21=DDR-2 etc. Here is a complete list of information you can get from the MemoryChip Class.

In my case unfortunately the type is unknown (0), but I still get some useful information:

wmic output

  • 2
    Thank u. When I enter this command it displays memory type as 21 which is equal to DDR2, but the actual memory type in my slot is DDR3. It does confusing.pls explain. – baalji av Jun 11 '13 at 15:14
  • 1
    @baaljiav: What do CPU-Z, Speccy etc. show? Is there any specific reason you want to display the info at the command prompt? – Karan Jun 11 '13 at 15:24
  • @Karan, Wouldn't CPU-Z show the same as the cmd? Indeed wouldn't the cmd be more reliable than CPU-Z? – Pacerier May 16 '15 at 20:47
  • 1
    If you see a 0 there, there are chances that it’s a DDR4 RAM, unknown to WMIC command. – Jayendran Dec 13 '17 at 7:12
  • 1
    Does not work with DDR4 – Oliver Meyer Nov 15 '20 at 13:43

There is software out there that gathers information on some of the main devices of your system.

These program will display the details for you (and more). One example is CPU-Z. A screenshot that shows the information you are looking for:


Now, as per the excellent comment left by Breakthrough (I've copied it in case for any reason he decides to delete his comment):

You can run CPU-Z from a command prompt, and using the -txt=report.txt will place the CPU-Z output into the file report.txt without invoking the GUI (it also mentions a -console switch to output the information to STDOUT, but says it works under Windows XP only for some reason). See additional parameters here for additional details. – Breakthrough

  • Note that CPU-Z must be run as administrator (i.e., with elevated permissions)  to be able to get information on memory. – Scott Oct 21 '18 at 17:09
  • Useless, only says "4 Gbytes" and nothing else – Ivan Castellanos Aug 1 '19 at 16:57

For a better look of the output, consider adding list full after wmic memorychip.

i.e., open cmd then type wmic memorychip list full

enter image description here

  • 1
    Look at the MemoryType=0 line, wmic can't detect DD4 or other new types of memory because it hasn't been updated to the latest SMBIOS spec so don't use it. See my answer for a solution that actually works – phuclv Apr 10 '20 at 2:12

wmic MemoryChip is highly outdated and doesn't show correct outputs for DDR3 and up. I've written a PowerShell script that reads the raw SMBIOS tables and parse the Memory Device table (Type 17). Currently it's based on SMBIOS specification version 3.4.0a and will need to be updated in the future if there any new RAM types in the new spec

Sample output:

D:\> .\ram_type.ps1
Size: 8,589,934,592 bytes (8 GB)
Memory form factor: 0x09 DIMM
Memory type: 0x1A (DDR4)
Type detail: 0x80 (Synchronous)
Speed: 2,666 MT/s
Size: 8,589,934,592 bytes (8 GB)
Memory form factor: 0x09 DIMM
Memory type: 0x1A (DDR4)
Type detail: 0x80 (Synchronous)
Speed: 2,666 MT/s

Here's the script. Tested on many PCs with DDR3 and DDR4. On many cases you'll see "0 GB" entries because there are still empty slots in the machine

Just save it as *.ps1 and run, or copy the whole script and paste into PowerShell

# 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) {
    } 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 }
        # if ([Math]::Floor($size/32768) -eq 0) { $size *= 1MB } else { $size *= 1KB } # For PowerShell < 3.0
    } 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[$_] }
        # if (([int]([Math]::Pow(2, $_)) -band $typeDetail) -ne 0) { "{0}" -f $TYPE_DETAILS[$_] } # For PowerShell < 3.0
    "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


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

    $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)
  • 1
    is the downvote just because some guys are afraid of powershell? – phuclv Apr 10 '20 at 11:02
  • 1
    This is the only reliable answer that doesnt require third party software and is backed by the specification. Why is this the second lowest answer? – Kevin Groenke Aug 5 '20 at 17:30
  • Does work as advertised. Needs additional info on how to execute. I stored in c:\tmp\getMemoryInfo.ps1 In Powershell I did the following: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process and then c:\tmp\getMemoryInfo.ps1 The first command was required to allow the execution of an unsigned script. – Oliver Meyer Nov 15 '20 at 13:31
  • @OliverMeyer you don't need to set the execution policy if you copy and paste directly into PowerShell – phuclv Nov 15 '20 at 13:44
  • 1
    Yes, works like a charm now! – Janus Bahs Jacquet Jan 10 at 3:27

Another alternative you can use, which is free, is Speccy... by the same people who make CCleaner.

It gives you all your hardware specs, as well as temps, voltages, and other data in real time

  • Why didi Speccy get 0 votes but CPU-Z get 10 upvotes? – Pacerier May 16 '15 at 20:51
  • 3
    @Pacerier: I see you didn't upvote it either. :) Raising this issue is pointless, especially on 2 year old answers. You've been around long enough to know that sometimes there's no (apparent) rhyme or reason for people's voting. I've seen better answers (not saying this is one) with far less votes or even none compared to worse answers, with the latter even being accepted by the OPs sometimes. That's just how it is. If you want to debate this the best place is Meta, or Chat. – Karan May 16 '15 at 21:02
  • Note that Speccy must be run as administrator (i.e., with elevated permissions) to be able to get information on memory. – Scott Oct 21 '18 at 17:09
  • this doesn't actually answer the question which is about getting the RAM type in command prompt – phuclv Aug 18 '20 at 2:04

Open the Command Prompt from the Start menu. You can also press ⊞ Win+R and type cmd to start it.

Type wmic MEMORYCHIP get BankLabel,DeviceLocator,Capacity,Speed and press ↵ Enter

The BankLabel column will tell you which slots the RAM chips are installed in.

  • how is this different from the current top voted answer? And the OP is asking about memory type (DDR2, DDR3, etc.) not about the bank, but wmic command doesn't work for DDR3, DDR4 and up – phuclv Apr 10 '20 at 2:17

While many answers note that wmic is obsolete, you can get the part number right and google that:

wmic memorychip get partnumber

Usually a Google search using just the part number will return several pages where the memory specs are detailed.

Perhaps really old RAM parts will not return useful results, but then wmic should work on these really old RAM sticks.

  1. Go To Start (Or Ask me anything) and type in Cmd then click on CommandPrompt
  2. In console window type (or paste) wmic MemoryChip

You should get the full information about your RAM

wmic MemoryChip output


For me, I can't see the voltage of the RAMs on my laptops for some reason using any of the programs mentioned above...

If you have the same problem as me, once you find the part number using cmd (see the picture above by other posts)

wmic memorychip list full

Google the part number, and you shall be able to find more relevant information on your RAM.

Firstly by part no. (eg. HMT451S6AFR8C-PB) the webpage is no longer available but there's cache on google! XD https://webcache.googleusercontent.com/search?q=cache:8vi-pY_TttYJ:https://schreibfehler.eu/w-123/hmt451s6afr8c-pb.html+&cd=1&hl=en&ct=clnk&gl=sg&client=firefox-b

From the webpage I found out the name and maker of the RAM, then I searched again with voltage as search string: "SK HYNIX 4GB 1Rx8 PC3 12800S voltage"


I guess you can try searching directly in ebay as there is a lot of second hand parts on sale on ebay and your ram might just pop up on the list using part no. as the search string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.