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.
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:
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
For a better look of the output, consider adding list full
after wmic memorychip
.
i.e., open cmd then type wmic memorychip list full
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) {
$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 }
# 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
$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)
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.
Commented
Nov 15, 2020 at 13:31
if (($size -shr 15) -eq 0)
). This is on a very old machine running Windows 7, so probably an ancient version of PowerShell too – could that be why?
Commented
Jan 10, 2021 at 1:16
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
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.
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.
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"
https://www.ebay.com/p/SK-Hynix-4gb-Pc3-12800-Ddr3-204-pin-SODIMM-1-35v-Low-Voltage/664910591
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.
Start
(Or Ask me anything
) and type in Cmd
then click on CommandPrompt
wmic MemoryChip
You should get the full information about your RAM
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.