Windows Memory Diagnostic is the built-in RAM test in Windows. Press Win + R, run mdsched.exe, choose to restart now, and the PC reboots into the test and shows the result after you sign in.
Save your work first, because the restart is immediate if you pick the first option.
How to run Windows Memory Diagnostic
- Press
Win + R, typemdsched.exeand press Enter. You can also typemdschedin the Start menu search box. - Choose one of the two options: restart now and check for problems, or check for problems the next time you start the computer.
- After the restart, the test starts by itself and performs a standard memory test.
- When testing finishes, the computer restarts automatically and you see the results after you log on.
Microsoft's documentation of the steps dates from Windows 7 and a Windows 10 preview. The mdsched.exe name and the options below are the same ones people use on current Windows 10 and 11, but the wording of the screens can differ slightly between versions.
Basic, Standard or Extended: change the test options
While the test is running, press F1 to open the options. Use the arrow keys to move between them, then press F10 to apply and resume testing.
| Option | Choices | What it does |
|---|---|---|
| Test mix | Basic, Standard, Extended | Fewer or more tests. Standard is what runs by default. |
| Cache | Default, On, Off | Sets the processor cache behavior for each test. |
| Pass count | Number | How many times the whole test mix repeats. The maximum is 15. |
For a PC that is crashing and you want a thorough check, pick Extended and raise the pass count. For a quick check, leave Standard alone. Microsoft does not publish how many tests each mix contains for the current Windows version, so this article does not quote a number.
Where to find the Windows Memory Diagnostic results
The result normally appears as a notification after you sign in. If you missed it, it is also recorded as an event from the source Microsoft-Windows-MemoryDiagnostics-Results. A passing run logs event ID 1201 with this description (from a Microsoft Q&A post):
The Windows Memory Diagnostic tested the computer's memory and detected no errors
The event data in that post contains <CompletionType>Pass. To list recent results in PowerShell:
Get-WinEvent -FilterHashtable @{ ProviderName = 'Microsoft-Windows-MemoryDiagnostics-Results' } -MaxEvents 5 | Format-List TimeCreated, Id, Message
I did not run this command while writing, so treat it as untested on your version. If it returns nothing, the test did not finish, or the result was not logged. Open Event Viewer and search for MemoryDiagnostics instead.
Before you start the test
The test runs outside Windows, so the PC is unusable until it finishes. A few habits make the run less painful:
- Save and close everything. Choosing the restart-now option reboots the machine right away, and unsaved documents are lost if an app does not save them.
- Use the check-at-next-restart option if you are busy. The test then runs the next time you restart, so you can pick a moment when you do not need the computer.
- Plug in a laptop. A long Extended run with several passes can take a while, and a battery that runs out mid-test leaves you with no result.
- Write down the symptoms. Note any blue screens, random restarts or application crashes and roughly when they happen. If the test passes, that list helps you decide what to check next.
How to read the result
A message saying no errors were detected means the selected tests found nothing during that run. It is a useful data point, not a guarantee. If the symptoms continue, run the test again with the Extended mix and a higher pass count, because a fault that appears only now and then may need more repetitions to show up.
A message that errors were detected is more decisive. Memory that fails a test while nothing else is running is a strong sign that a module, a slot or the memory settings are at fault, so follow the steps in the next sections to narrow down which one.
Run the test again if the PC crashes because of memory
If a crash is caused by failing memory and Windows Memory Diagnostics detects it, Windows prompts you to schedule a memory test at the next restart. You do not need to start it by hand in that case.
What to do if the test finds errors
- Shut down and unplug the PC. Reseat each RAM module firmly.
- Remove all but one module and run the test again. Repeat for each module.
- Move a stick that failed into another slot. If it still fails, the module is bad. If it passes in the other slot, suspect the first slot.
Before swapping parts, check that the RAM runs at the speed it is rated for; how to check RAM speed shows how.
If the test does not run or never finishes
- Windows loads normally and no test ran. Run
mdsched.exeagain and choose the restart-now option, so the test starts on that restart. - No result appears after sign-in. Search Event Viewer as above. The result may have been logged without a notification.
Frequently asked questions
- How long does Windows Memory Diagnostic take?
- Microsoft's documentation does not give a fixed time. It depends on how much RAM is installed and which test mix you choose. Basic is the shortest and Extended is the longest, so plan for the Extended test to run for a long time on a machine with a lot of memory.
- Can I stop Windows Memory Diagnostic halfway?
- You can restart the PC to leave the test, but an interrupted run has not finished checking the memory, so do not count it as a pass. If you need the computer now, choose the option to check at the next restart instead.
- Does a pass prove my RAM is good?
- No. A pass means the tests that ran found no errors in that run. Faults that depend on temperature, speed settings or a particular access pattern can be missed. If the PC keeps crashing, run the Extended mix with more passes, or test one module at a time.
- What if Windows Memory Diagnostic finds errors?
- Treat the module as suspect. Shut down, reseat the RAM, test one stick at a time in the same slot, then test the slot with a known-good stick. A stick that fails in every slot should be replaced.