Open CMD at Boot When Windows Won't Start (Windows 11/10)
The fastest way to get a Command Prompt at boot on Windows 11 or Windows 10 is to hold Shift and click Restart from the power button on the Sign-in screen or Start menu — that drops you straight into the Windows Recovery Environment (WinRE), where Troubleshoot → Advanced options → Command Prompt gets you a prompt before Windows itself ever loads. And here's the part almost nobody tells you: the other classic trick — forcibly powering off the PC three times in a row during boot — isn't a hack you're getting away with. It's a documented Microsoft feature. Windows counts consecutive failed boot attempts on purpose, and on the third one it hands you the recovery menu automatically. You're not tricking the machine; you're using a switch Microsoft built in and labeled for exactly this. That matters because it changes how you should think about the whole topic. This isn't a workaround living in the cracks of Windows — it's a supported repair path, and Microsoft expects you to use it. What trips people up isn't finding the menu. It's what happens once you're in it: a password prompt you didn't expect, a BitLocker recovery key screen instead of Command Prompt, or a Command Prompt option that's simply missing from the list. This guide covers the boot-time paths for both Windows 11 and Windows 10 separately (they're close but not identical), the traps that stop people cold, and the commands worth knowing once you're actually staring at a blinking cursor.
What "CMD at boot" actually means
Every time you turn on a Windows 11 or Windows 10 PC, there's a narrow window before the desktop loads where the machine is running a tiny recovery-focused operating system called the Windows Recovery Environment, or WinRE for short. It's not your installed Windows — it's a separate, minimal environment stored in its own partition on the drive, built specifically so you can fix Windows even when Windows itself can't start. Command Prompt at boot means launching CMD from inside WinRE, rather than from inside a working desktop.
This distinction matters because it explains why the fixes you run from here are different, and sometimes riskier, than the ones you'd run from a normal desktop CMD window. Inside WinRE, CMD isn't sitting on top of a running Windows session — it's often looking at your Windows installation from the outside, as a drive letter like D: instead of C:, which is exactly why commands like bootrec and diskpart exist: they're built to repair a Windows installation that isn't currently running.
♂️ Jake's Reality Check
"A customer dropped off a laptop that just sits on a black screen with a spinning circle. I don't even know what I'm looking at, let alone how to fix it. Do I need special software for this?"
No. Everything in this guide is already sitting on the machine — WinRE is built into every Windows 11 and Windows 10 install. The only time you need extra hardware is if WinRE itself is damaged or missing, which is what the installation-media method further down is for.
Ethan puts it this way when he's explaining this to Jake: "Think of WinRE like the spare tire in your trunk. It's not the tire you drive on every day, and you hope you never need it, but it's sitting there, already inflated, specifically for the day the main one fails. You don't buy a spare tire when the flat happens — it's already there. Same with WinRE. Microsoft put it on every install for exactly this moment." His opinion on which of the five methods below to reach for first is blunt: "Shift-and-Restart, every time, if you can. The three-shutdown trick works, but it's slower and it makes people nervous watching their PC die three times in a row. Save it for when the PC genuinely won't give you anything else to click."
Which of these is happening to you?
Before you pick a method, match your situation to one of these three, because the "right" way in changes depending on what the PC is actually doing:
| What you see | Go to |
|---|---|
| Sign-in screen, Start menu, or a working desktop | Method 1 (Shift + Restart) below |
| Windows logo, spinning ring, or a black screen that never progresses | Method 3 (three forced shutdowns) |
| You already tried forced shutdowns and WinRE itself won't load, or shows "Repair your PC couldn't start" | Method 4 or 5 (installation media or recovery drive) — the on-disk WinRE is damaged, so you need an outside copy |
Access CMD at boot in Windows 11
Windows 11 gives you five practical ways in, roughly ordered from "the PC is basically fine" to "the PC won't boot at all."
Method 1: Shift + Restart (the one to try first)
If you can see the Sign-in screen, the Start menu, or the desktop, this is faster than any of the alternatives below.
1. Click the power icon — on the Sign-in screen it's bottom-right; on the Start menu it's bottom-right of that panel too.
2. Hold Shift on your keyboard and click Restart without letting go of Shift until the screen changes.
3. The PC reboots straight into WinRE's blue "Choose an option" screen instead of Windows.
4. Select Troubleshoot → Advanced options → Command Prompt.
Method 2: Settings → System → Recovery
This is the deliberate, no-forced-restart version. Open Settings, go to System → Recovery, and under "Recovery options" click Restart now next to Advanced startup. From there it's the same Troubleshoot → Advanced options → Command Prompt path. On current Windows 11 builds this Recovery page lives directly under System — it moved out from under Windows Update during the Settings reorganization, so if you're following an old screenshot that shows it under "Update & Security," that's the Windows 10 layout, not 11's.
Method 3: Three forced shutdowns (Automatic Repair)
This is the one you reach for when the PC won't get far enough to show you a Sign-in screen at all. Power the PC on, and the moment you see the Windows logo (or even just a black screen with a spinning ring), hold the physical power button until it shuts off. Do this three times in a row. On the third attempt, Windows detects the pattern of failed boots and drops you into WinRE automatically — sometimes labeled "Preparing Automatic Repair," sometimes going straight to "Choose an option."
As mentioned above, this genuinely is by design, not an exploit. Windows Boot Manager keeps a small counter of consecutive failed startups specifically so it can offer recovery instead of trying, and failing, forever. It's a slower route than Shift + Restart, and it's harder on your patience, but it doesn't damage the drive — you're interrupting a boot process, not writing to disk mid-operation.
Method 4: Windows 11 installation media
Use this when the PC's own copy of WinRE is damaged, missing, or the recovery partition has been deleted — a bootable USB carries its own independent WinRE.
1. Insert a Windows 11 installation USB (built with Microsoft's Media Creation Tool, or Rufus).
2. Restart and press the boot-menu key for your PC — commonly F12, F2, Esc, or Del — and choose the USB drive.
3. On the "Install Windows" screen, pick your language and keyboard layout, then look at the bottom-left corner for Repair your computer. Don't click Install.
4. Troubleshoot → Advanced options → Command Prompt.
Method 5: A recovery drive
If you built a USB recovery drive ahead of time (Control Panel → Recovery → Create a recovery drive), boot from it the same way as installation media above. The menu it lands you on goes straight to Troubleshoot without an install screen in between.
What changed since we first wrote this
- Then: this guide originally described reaching Advanced Startup through Settings → Update & Security → Recovery, which was correct for the Windows 10 interface at the time.
- Now: Windows 11 moved that page. It lives under Settings → System → Recovery, with no "Update & Security" section left in the app at all.
- What that means for you: if you're on Windows 11, look under System, not Update. Windows 10 still uses the older Update & Security location, covered in the next section.
Access CMD at boot in Windows 10
Every method above exists on Windows 10 too, and the mechanics inside WinRE itself — Troubleshoot, Advanced options, Command Prompt — are identical on both operating systems. The differences are all in how you get there.
Shift + Restart and the three-shutdown trick
These work exactly the same on Windows 10 as Windows 11 — same key combination, same power-button behavior, same automatic detection after three failed boots. No differences worth documenting twice.
Reaching it through Settings
On Windows 10, open Settings, then Update & Security, then Recovery from the left-hand pane. Under "Advanced startup," click Restart now. The PC reboots into WinRE, and from there the path is the same: Troubleshoot → Advanced options → Command Prompt.
Installation media and recovery drives
Identical process to Windows 11 above — boot the USB, choose your language, click Repair your computer instead of Install, then Troubleshoot → Advanced options → Command Prompt. The one thing to get right is using a Windows 10 installation USB for a Windows 10 machine; a Windows 11 installer's WinRE can behave oddly against a Windows 10 install, particularly around BitLocker and driver recognition.
⚠️ The honest state of Windows 10 right now
Windows 10 stopped receiving free security updates on October 14, 2025. Everything in this section still works exactly as described — WinRE, CMD, the repair tools — because it's part of the operating system, not part of the update stream. But if you're troubleshooting a Windows 10 PC in 2026, it's worth knowing you can still enroll in Consumer Extended Security Updates through Settings → Windows Update → Enroll now (Microsoft extended coverage on that program through October 2027), or treat this repair session as a good moment to check whether the machine actually qualifies for a free Windows 11 upgrade before you sink more time into it.
The trap that stops most people: a password or recovery-key screen
This is where the original version of this guide left a gap, and it's the single most common reason people give up before reaching Command Prompt at all: instead of the Advanced options menu, you get a screen asking for an account password, or a BitLocker recovery key.
If it's asking for your account password
Certain paths through WinRE — not Command Prompt itself, but things like System Restore or "Continue to Windows 11/10" — check that whoever's sitting at the keyboard actually owns the machine, so they ask for the sign-in password of an administrator account on that PC. Select your account from the list shown and enter the same password you'd use to sign in normally. If the account uses a Microsoft account rather than a local one, that's your Microsoft account password, not a PIN — PINs are tied to the specific device and generally aren't accepted here.
⚠️ What this actually breaks
Name what we can't do here: if you genuinely don't know the account password, plain Command Prompt access under Troubleshoot → Advanced options usually doesn't require it — but several of the things you'd want CMD for, and several of the other Advanced options entries, do. There's no legitimate trick in this guide that gets you past a password you don't have; that's outside the scope of what we'll walk through here.
If it's asking for a BitLocker recovery key
This one catches people off guard because they never remember turning BitLocker on. Since the Windows 11 24H2 update, Device Encryption — a lighter version of BitLocker available even on Home edition — has been enabled by default on new PCs and clean installs. If you never disabled it, your drive is encrypted, and WinRE knows it. On a healthy boot this is invisible; the moment WinRE needs to touch the drive to run repairs, it asks for the 48-digit recovery key.
That key isn't something you memorize. On a PC set up with a Microsoft account, it's saved automatically to that account. From any other device with internet access, sign in at aka.ms/myrecoverykey and it'll list the key tied to that PC, provided you signed in with the same Microsoft account during setup. Business or school PCs usually have the key stored with an IT administrator instead. Without it, WinRE can still get you to a Command Prompt on some builds, but full repair operations against the encrypted drive are blocked until you either unlock it or Windows Setup formats over it.
| Method | Needs a working desktop? | Use it when |
|---|---|---|
| Shift + Restart | Yes, or at least the Sign-in screen | Windows still starts, you just need the recovery tools |
| Settings → Recovery | Yes | You're already signed in and planning ahead, not in a panic |
| Three forced shutdowns | No | Windows won't boot far enough to show a Sign-in screen |
| Installation media | No | The PC's own recovery partition is damaged or missing |
| Recovery drive | No | You built one ahead of time and want to skip the installer screens |
Third-party rescue tools, honestly
You'll find plenty of paid boot-repair utilities and rescue-disk builders advertised alongside this exact search. Ethan's take on most of them, having watched customers buy them for years: "Skip it. Every command in this guide is already free, already installed, and already the same tool Microsoft's own support technicians reach for. You're not missing anything by not paying for a wrapper around bootrec."
Where a third-party rescue disk genuinely earns its place is in two narrower situations: recovering files from a drive that Windows itself refuses to recognize at all, where a Linux-based rescue environment like a Hiren's BootCD PE build can sometimes mount a file system Windows' own WinRE can't, and cloning a failing drive to a new one before attempting any repair, which dedicated imaging tools like Macrium Reflect's rescue media handle more reliably than a manual robocopy pass. Jake pushed back on this the first time Ethan explained it: "So why wouldn't I just always use the fancier tool instead of learning all these Microsoft commands?" Ethan's answer: "Because the fancier tool still can't fix a broken BCD or a corrupted system file — it's built for a different job. Learn WinRE first. Reach for the extra tool only for the two things it's actually better at."
Set this up once so you're never caught out
If you're the person your family or your shop's customers call when this happens, it's worth spending fifteen minutes now rather than scrambling later. Build a recovery drive ahead of time (search "Create a recovery drive" from the Start menu, tick the box to back up system files to it if the USB is 16 GB or larger), and label it clearly. Keep it with your toolkit, not buried in a drawer.
For a shop running the same repair steps repeatedly, it's also worth saving your own text file with the exact bootrec and sfc command sequence you use most, stored on that same recovery USB. Command Prompt at boot can open a text file with notepad D:\notes.txt just like a normal desktop session, which turns a five-command repair into a copy-paste job instead of something typed from memory under pressure with a customer standing at the counter.
Two habits make this repeatable instead of a one-off. First, name the recovery USB itself and write the date you built it on a physical label — WinRE builds change often enough that a three-year-old recovery drive can behave differently against a current install than a fresh one, and knowing its age tells you whether to trust it or rebuild it. Second, for every customer machine that comes in for anything boot-related, note in your intake paperwork whether BitLocker or Device Encryption is on and whether you were given (or could retrieve) the recovery key before you start — that single check, done up front, is what turns the trap covered earlier in this guide from a mid-repair surprise into a five-second look-up.
The commands worth knowing once you're in
A blinking cursor with no menus is intimidating the first time you see it. Here's what each of the useful commands actually does, and — more importantly — what it looks like when each one fails, because "it didn't work" is a lot less scary once you know what failure is supposed to look like.
chkdsk
Short for "check disk," this scans a drive's file system for corruption and, with the right flag, fixes what it finds. From WinRE your Windows drive usually isn't C: — run wmic logicaldisk get deviceid, volumename, size first to confirm which letter it's using, then run chkdsk D: /f /r (swap in the real letter). The /f flag fixes errors; /r additionally locates bad sectors and tries to recover readable data from them, which takes far longer on a spinning hard drive than on an SSD.
What failure looks like: chkdsk runs in five numbered stages. If it stalls for a long time on Stage 4 or 5, that's normal on large or heavily fragmented drives — let it finish. If it reports "the volume appears to contain one or more unrecoverable problems" and repairs nothing, that usually means physical disk damage rather than a file-system glitch, and it's a signal to back up data immediately rather than run chkdsk again.
sfc /scannow
System File Checker compares your Windows system files against a known-good cached copy and replaces any that are missing or corrupted. From WinRE, it needs to be pointed at the offline installation explicitly: sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows (again, adjust the drive letter).
What failure looks like: "Windows Resource Protection did not find any integrity violations" means your system files are fine — that's a good result, not a failure, even though it feels like nothing happened. "Windows Resource Protection found corrupt files and successfully repaired them" is sfc doing its job. The one that means more work: "found corrupt files but was unable to fix some of them." That's when the next step is DISM /Image:D:\ /Cleanup-Image /RestoreHealth, which repairs the underlying system image sfc pulls its known-good copies from.
bootrec
This repairs the boot configuration data (BCD) that tells your PC's firmware where to find Windows. Run each of its four sub-commands in order if the PC boots to a black screen or "Operating System not found": bootrec /fixmbr, bootrec /fixboot, bootrec /scanos, then bootrec /rebuildbcd.
What failure looks like: /fixboot occasionally returns "Access is denied" — that almost always means the System Reserved partition lost its active flag, fixable with a short diskpart session to reassign it. /rebuildbcd reporting "0 Windows installations found" after a successful /scanos means the BCD store itself is too damaged to patch, and it's faster to delete and rebuild it from scratch with bcdboot D:\Windows than to keep fighting the existing one.
diskpart
The command-line disk and partition manager. It's the most powerful tool on this list and the easiest one to cause real damage with, since commands like clean erase a partition table with no confirmation prompt.
⚠️ What this actually breaks
Inside diskpart, list disk and select disk are safe to run and just show information. Anything that follows select — clean, format, delete partition — acts on whichever disk you last selected, immediately, with no undo. Double-check the disk number against its size in gigabytes before running anything destructive; disk numbering can differ from what you'd expect, especially with multiple drives installed.
robocopy (the adjacent task)
Once you're in Command Prompt at boot for any reason, it's worth knowing you can also grab your files before doing anything riskier. robocopy D:\Users\YourName\Documents E:\Backup\Documents /E copies an entire folder, including subfolders, from your Windows drive to an external drive plugged in for the occasion. It's the same tool professional backup routines use, it resumes if interrupted, and it's already sitting on the machine — no extra download needed.
exit
Closes Command Prompt and returns you to the Advanced options menu, where you can choose Continue to boot normally, or Turn off your PC.
Alternative routes, and one piece of outdated advice
Older guides to this topic, including earlier versions of this one, mention pressing F8 repeatedly during boot to reach an advanced boot menu with a Safe Mode with Command Prompt option. Stop looking for it. On any current Windows 10 or Windows 11 PC with Fast Startup on — which is the out-of-box default — that timing window is gone entirely; there is no moment during boot for F8 to catch, no matter how many times or how precisely you time the tap. It is not intermittent, it is not a driver issue, and mashing it harder will not help. The replacement is the same Shift + Restart combination covered above, followed by Troubleshoot → Advanced options → Startup Settings → Restart, which brings up a numbered list including "4) Enable Safe Mode" and "6) Enable Safe Mode with Command Prompt."
✅ Why this is the one to use
Between plain WinRE Command Prompt and Safe Mode with Command Prompt, use plain WinRE Command Prompt for repair tools like chkdsk, sfc, and bootrec — they're designed to run against an offline drive. Save Safe Mode with Command Prompt for situations where you specifically need Windows itself running (uninstalling a driver, disabling a startup program) but the normal desktop won't load far enough to do it.
Edge cases: tablets, laptops, and no-keyboard devices
WinRE includes an on-screen keyboard for exactly this situation — look for a small keyboard icon in the bottom corner of any WinRE screen, including Command Prompt itself. On a tablet with no physical Volume/Power button combo documented by the manufacturer, check the device's specific key combination for entering firmware setup first (commonly Volume Up + Power held together), since some tablets need that route to force a boot-menu selection at all rather than relying on three failed boots.
Laptops behave the same as desktops for every method above, with one caveat: if the laptop uses a fingerprint reader or facial recognition as its sign-in method, the account-password prompt inside WinRE still wants the underlying password, not the biometric — keep it written down somewhere that isn't only accessible from the locked device.
Virtual machines follow the same steps as physical hardware; interrupting the VM's boot three times triggers Automatic Repair exactly like it does on real hardware, since it's Windows itself detecting the failed boots, not the firmware underneath it.
Multi-monitor setups occasionally cause the WinRE screen to render on a display you're not looking at, particularly with a dock or a docking-station GPU involved. If the screen you expect stays black after a Shift + Restart, check any other connected monitor before assuming the process failed — WinRE tends to default to whichever port the firmware considers primary, which isn't always the one Windows itself was using.
Remote-desktop sessions can't reach this at all, by design. WinRE runs before Windows' own networking stack loads, so if you're trying to talk a family member or a customer through this over the phone, you're guiding them through it verbally rather than connecting in remotely — worth setting that expectation before you start.
A word on privacy and physical security
Everything covered here needs physical access to the machine — there's no remote angle to any of it. But that's exactly why it's worth thinking about from the other side: anyone with a few unsupervised minutes at your PC and a USB stick can reach the same Command Prompt you just learned to reach. Device Encryption or full BitLocker (the same recovery-key system covered above) is what stands between "boots to CMD" and "can actually read your files" — it's on by default on most current Windows 11 PCs, and worth confirming is on if you're running Windows 10 or an older Windows 11 install that predates that default.
Frequently asked questions
What is WinRE and how is it different from Safe Mode?
WinRE is a separate mini-OS that runs instead of Windows, before Windows loads. Safe Mode is Windows itself, running with most drivers and startup programs disabled. WinRE works even if Windows can't boot at all; Safe Mode still requires Windows to boot, just in a stripped-down state.
Why does Windows ask for my account password before letting me into Advanced options?
It's a safeguard against someone other than the PC's owner using recovery tools to reset settings or access files. Plain Command Prompt access often skips this, but several of the other Advanced options entries require it.
Does forcing three shutdowns damage my hard drive or SSD?
No. You're interrupting the boot sequence before the drive is doing any significant writing, and Windows itself is designed to detect exactly this pattern and respond to it, rather than treating it as an error condition.
Can I access CMD at boot without a Windows installation USB?
Yes, as long as the recovery partition on the PC's own drive is intact. Shift + Restart, the Settings → Recovery page, and three forced shutdowns all use that built-in partition rather than external media. Installation media is only needed if that partition is damaged or missing.
Why does F8 not open the boot menu on Windows 10 or 11 anymore?
Fast Startup changed how Windows shuts down and boots, removing the timing window the old F8 boot menu relied on. Shift + Restart, followed by Startup Settings inside Advanced options, replaces it.
What do I do if Command Prompt isn't listed under Advanced options at all?
Some manufacturer recovery partitions strip Command Prompt out of the menu deliberately. Booting from a standard Windows installation USB and choosing Repair your computer instead of the PC's own recovery partition restores the full, unmodified Advanced options list.
Is it safe to run chkdsk /f on an SSD?
Yes, the file-system check itself is safe on any drive type. The /r flag, which additionally scans for bad sectors, is far less useful on an SSD since SSDs handle failing sectors internally at the firmware level — /f alone is usually sufficient.
What does "Windows Resource Protection did not find any integrity violations" actually mean?
It means sfc checked your system files and found nothing wrong. It's a clean bill of health, not an error, even though the phrasing can read as ominous.
My PC asks for a BitLocker recovery key before I can even reach Troubleshoot — what now?
Sign in to aka.ms/myrecoverykey from another device using the Microsoft account tied to that PC; the key is usually saved there automatically. If the PC belongs to a workplace or school, the key is typically held by an IT administrator instead.
Can I use CMD at boot to back up my files before reinstalling Windows?
Yes — robocopy, covered above, is the tool for exactly that, copying files from your Windows drive to an external one before you do anything more drastic.
Does Windows 10 still let me access CMD at boot after end of support?
Yes. WinRE and every method in this guide are part of the operating system itself, not part of the security-update stream that ended on October 14, 2025.
What's the difference between Startup Repair and manually running bootrec from CMD?
Startup Repair is an automated tool that runs a similar set of fixes without you typing anything. Running bootrec manually gives you more control and, importantly, tells you exactly which step failed if the automated version doesn't fix things — useful information Startup Repair doesn't surface on its own.
Can I use these same steps on a tablet with no physical keyboard?
Yes, using the on-screen keyboard built into WinRE itself, available on every screen including Command Prompt.
Will accessing CMD at boot void my warranty or trigger any security flags?
No. It's a supported, built-in part of Windows, used the same way by Microsoft support technicians and by manufacturers' own repair processes.
- What Command Prompt actually is and what it's for
If you're comfortable getting into CMD at boot but still unsure what to do with it once you're there, this covers the basics.
Revision note. Originally published September 5, 2015. Rewritten for Windows 11 and Windows 10, covering both operating systems' current recovery interfaces. Settings navigation has moved since this was first written — Windows 11 relocated Recovery from Update & Security to System, and the F8 boot menu this guide once pointed to has been replaced by Fast Startup's Shift + Restart path. If you landed here because a machine won't boot and someone is waiting on it, take a breath first: almost everything in this guide is reversible, and the tools you need were already on the PC the whole time.