Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The useful Windows 11 Recovery Environment (WinRE) Command Prompt commands in this guide are bcdedit to identify the Windows volume, chkdsk to check or repair its file system, sfc to scan protected files in an offline installation, and DISM to repair an offline Windows image. First find the installation’s actual drive letter: it may not be C: in WinRE. There is no guaranteed exhaustive command list for every recovery image or device.

Open Command Prompt in Windows Recovery Environment

Windows RE is a built-in recovery environment. Microsoft describes its Command Prompt as providing access to a command-line interface for advanced troubleshooting. It is intended for diagnosis and repair when Windows may not start; it is not the same as a normal Windows desktop command prompt.

  1. If you can reach Windows recovery options: open Settings > System > Recovery, then choose Restart now under Advanced startup. In WinRE, choose Troubleshoot > Advanced options > Command Prompt.
  2. If Windows will not start: start the PC from Windows installation media, then choose Repair your PC to reach recovery options. Installation media is a way to access recovery tools; the USB drive itself does not repair Windows.

The exact tools and commands available can vary with the recovery image and device. If Command Prompt asks you to unlock an encrypted drive, you may need the BitLocker recovery key before you can work with the Windows installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the Windows drive letter before running repair commands

In WinRE, Windows may appear under a different letter than it does during normal use. Do not assume that the Windows installation is on C:. Microsoft’s documented workflow uses BCDEdit and the osdevice value; its example identifies D:, but that is an example, not a universal path.

#1 Best Overall
Sale
Microsoft Windows 11 (USB)
  • Less chaos, more calm. The refreshed design of Windows 11 enables you to do what you want effortlessly.
  • Biometric logins. Encrypted authentication. And, of course, advanced antivirus defenses. Everything you need, plus more, to protect you against the latest cyberthreats.
  • Make the most of your screen space with snap layouts, desktops, and seamless redocking.
  • Widgets makes staying up-to-date with the content you love and the news you care about, simple.
  • Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar. (1)
  1. At the Command Prompt, run bcdedit.
  2. In the Windows Boot Loader section, find osdevice. Note the volume shown there, such as partition=D:.
  3. Use that actual volume letter when adapting the commands below. For SFC, also use the path to the Windows directory on that volume. If the output does not identify a usable installation or you are unsure which entry applies, do not guess at a drive letter.

The commands below are Microsoft-documented examples using D:. Replace the example paths with the paths for the installation you identified.

Run commands according to the problem

Check the volume and attempt file-system repairs with CHKDSK

CHKDSK checks a volume’s file system and metadata. Its switches affect whether it only checks or attempts repairs. Microsoft’s WinRE example is:

chkdsk /f D:

Replace D: with the Windows volume you identified. The /f switch asks CHKDSK to fix errors it finds, so this is more than a read-only check. If you are uncertain that the selected volume is the right one, stop before running it.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scan protected system files in the offline Windows installation with SFC

Use SFC’s offline options when Windows is not running. Microsoft’s example is:

sfc /scannow /offbootdir=D: /offwindir=D:windows

Replace both paths with the actual boot directory and Windows directory for the installation. In particular, do not change only one occurrence of D: by habit: the offline boot directory and offline Windows directory must point to the correct installation.

Repair an offline Windows image with DISM

DISM can service an offline Windows image. Microsoft’s example is:

DISM /image:D: /cleanup-image /restorehealth

Replace the image path with the root of the offline Windows installation you intend to repair. A repair source may also be needed; if so, it must match the image being serviced. Do not treat the example as proof that any available installation media or image is a suitable source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use BCDEdit for identification, not guesswork

For this workflow, the supported BCDEdit step is to run bcdedit and inspect osdevice in the Windows Boot Loader section. That identifies the system volume used in Microsoft’s example workflow. It is not a reason to change boot configuration: boot and partition edits are configuration-specific and can make a startup problem worse if applied to the wrong target.

Choose the repair order carefully

Microsoft’s WinRE workflow checks the offline volume, runs SFC, then runs DISM, and repeats SFC if DISM fixes an issue. Follow that offline sequence when using these examples. Do not substitute the online DISM command syntax used for a running Windows installation: an offline image requires the /image: form and the correct installation path.

  1. Identify the Windows volume with bcdedit.
  2. Run the CHKDSK example only if you intend to let it fix file-system errors.
  3. Run SFC with the correct offline boot and Windows directory paths.
  4. Run DISM against the correct offline image, with a matching repair source if one is needed.
  5. If DISM fixes an issue, repeat the offline SFC scan as in Microsoft’s WinRE workflow.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When another WinRE tool may be a better choice

Command-line repair is not the only route. If the issue is startup-related, Microsoft’s Startup Repair tool attempts to diagnose common startup problems, including damaged system files and boot-configuration issues. Open it from Troubleshoot > Advanced options > Startup Repair. On an encrypted device, it may ask for the BitLocker recovery key.

Other recovery choices can fit problems tied to a recent change or update. Their effects differ, and some can cause data loss. Back up important files first when possible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
Microsoft Windows 11 (USB)
Microsoft Windows 11 (USB)
Make the most of your screen space with snap layouts, desktops, and seamless redocking.; FPP is boxed product that ships with USB for installation
$128.97
Bestseller No. 2
Option When it may fit Effect to consider
Command Prompt repairs You can identify the offline Windows volume and need to check the file system, protected files, or image. Commands act on the paths and volumes you specify; a wrong target or repair operation can cause problems.
Startup Repair Windows will not start and the suspected issue is a common startup problem. It attempts diagnosis and repair of startup problems.
Uninstall recent updates The startup or system problem followed a recent update. Removes a recent update rather than repairing files through the command-line workflow.
System Restore A restore point may help address a system change. Changes system state; check the recovery prompts and protect important files where possible.
Reset this PC Other recovery choices are unsuitable or have not resolved the problem. Can affect files and settings; review the selected reset option and back up important files first.

Stop and verify before making changes

  • Confirm the target: check the osdevice value and adapt every path to the installation you mean to repair.
  • Protect important files: back them up where possible before recovery actions that may cause data loss.
  • Have the BitLocker key available: an encrypted device may require it to access recovery tools or the Windows volume.
  • Avoid high-impact edits: do not make partition or boot-configuration changes unless you understand the exact target and the procedure for that configuration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.