bcdedit

On this page 7

bcdedit is the built-in Windows command-line tool for viewing and modifying the Boot Configuration Data (BCD) store, the firmware-independent database that tells the Windows Boot Manager which operating systems exist, where their loaders live and which boot options apply to each one. In the PowerShell & command line toolkit of Windows, it is the standard way to change startup behavior without editing hidden files by hand.

The tool replaced the plain-text boot.ini file used up to Windows XP. Since Windows Vista, boot settings live in a binary registry hive, so administrators need bcdedit, or a graphical front end such as System Configuration, to change them safely. It runs from an elevated Command Prompt, PowerShell session or Windows Recovery Environment.

How bcdedit works with the BCD store

bcdedit edits a store of objects and elements: each object represents one boot application or settings group, and each element is a single setting attached to that object. On UEFI systems the store sits on the EFI system partition at \EFI\Microsoft\Boot\BCD; on legacy BIOS systems it is located at \Boot\BCD on the active system partition.

Every object is identified by a GUID, and common objects also have well-known identifiers such as {bootmgr}, {current} and {default}. These aliases let administrators write commands that work on any machine without first looking up a GUID, which matters greatly in scripts and deployment tasks.

The following table lists the object identifiers that appear most often in bcdedit output.

IdentifierWhat it representsTypical use
{bootmgr}Windows Boot ManagerTimeout, display order, default entry
{current}The running operating system entrySafe mode, debugging, test signing
{default}Entry started when the timeout expiresChanging the default system
{memdiag}Windows Memory DiagnosticScheduling a RAM test
{fwbootmgr}UEFI firmware boot managerFirmware boot order on UEFI
Common BCD object identifiers

Changes take effect at the next restart, because the Boot Manager reads the store only during startup. bcdedit writes directly to the store, so there is no undo command; the only safety net is an exported copy made beforehand.

Essential bcdedit commands and switches

Most bcdedit work relies on a small set of switches that read, copy, change or remove entries. Running bcdedit without arguments equals bcdedit /enum, which lists the Boot Manager and the active loader entries; bcdedit /enum all also shows hidden and inactive objects.

SwitchPurposeExample
/enumLists entries in the storebcdedit /enum all
/exportSaves the whole store to a filebcdedit /export C:\bcd-backup
/importRestores the store from a filebcdedit /import C:\bcd-backup
/copyDuplicates an entry with a new GUIDbcdedit /copy {current} /d "Test"
/setSets one element on an entrybcdedit /set {current} nx OptIn
/deletevalueRemoves an element from an entrybcdedit /deletevalue {current} safeboot
/timeoutSets the boot menu wait timebcdedit /timeout 10
/displayorderChanges menu order or membershipbcdedit /displayorder {GUID} /addlast
Frequently used bcdedit switches

In PowerShell, braces have a special meaning as script blocks, so identifiers such as {current} must be quoted, for example bcdedit /set "{current}" safeboot minimal. Forgetting the quotes is the most frequent reason a command that works in Command Prompt fails in a PowerShell window.

Windows 11 version 24H2 and later releases also ship PowerShell cmdlets for the BCD store in the BootConfig module, but bcdedit remains the reference tool documented for recovery and is available in every supported edition.

Boot settings administrators change most often

Administrators use bcdedit mostly to switch diagnostic and security features on or off for a specific entry. The table below summarizes the elements that come up most often in troubleshooting and driver development.

ElementValuesEffect
safebootminimal, network, alternateshellStarts Windows in Safe Mode on every boot
testsigningon, offAllows test-signed kernel drivers to load
debugon, offEnables kernel debugging with a debugger
hypervisorlaunchtypeauto, offStarts or skips the Hyper-V hypervisor
bootmenupolicylegacy, standardSelects the text or graphical boot menu
recoveryenabledyes, noAllows automatic entry into recovery
nxOptIn, OptOut, AlwaysOn, AlwaysOffControls Data Execution Prevention
Frequently edited boot elements

Some elements interact with Secure Boot. With Secure Boot enabled, the firmware and Boot Manager ignore or block testsigning and kernel debugging, so developers must disable Secure Boot in firmware settings first. With BitLocker active, changing integrity-relevant elements can trigger a recovery key prompt at the next start, so the protector should be suspended before the change.

bcdedit edits individual settings, while neighboring tools create, repair or select boot configurations at a different level. Choosing the right tool avoids rebuilding a store that only needed one changed element.

ToolMain jobWhen to prefer it
bcdeditEdits objects and elements preciselyTargeted changes and scripting
bcdbootCreates boot files and a fresh BCD storeRebuilding a missing or damaged store
bootrecRepairs boot sectors and scans for systemsRecovery after boot sector damage
msconfigGraphical subset of boot optionsQuick Safe Mode or timeout changes
diskpartManages partitions and volumesAssigning a letter to the EFI partition
bcdedit and related tools

A typical repair sequence combines several tools: diskpart to expose the EFI system partition, bcdboot to recreate boot files, then bcdedit to restore custom settings. Tools such as System File Checker and DISM repair Windows files, not the boot store, so they do not replace any of these.

Risks and safe practice with bcdedit

A wrong bcdedit command can leave a machine unable to start, so careful practice is essential. The most effective safeguard is to run bcdedit /export before every change and keep the file outside the system partition.

  • Always back up first: an exported store can be restored from Windows Recovery Environment with bcdedit /import.
  • Avoid deleting {current} or the default entry; remove only entries confirmed with /enum.
  • Remove temporary settings such as safeboot with /deletevalue, or the system stays in Safe Mode on every boot.
  • Suspend BitLocker before changing security-relevant elements to avoid an unexpected recovery prompt.
  • Quote identifiers in PowerShell, because unquoted braces are parsed as script blocks.
  • Use /store to target an offline store when the running system is not the one being repaired.

Error messages such as “The boot configuration data store could not be opened” usually mean the console is not elevated or the EFI partition is not reachable, not that the store is damaged.

A plain-language summary

When a Windows computer starts, a small program checks a list of start options. This program is the Boot Manager. bcdedit is the tool that lets an administrator read and change that list by typing commands.

Think of it as a menu card for startup. It decides which system to start. It sets how long the menu waits. It can also send the computer into a protected repair mode. The key point is simple: changes apply at the next restart, and a backup copy should always come first.

An example from practice

A help desk technician supports a laptop that crashes shortly after logon because of a faulty graphics driver. Pressing keys at startup does not reach the recovery menu, so the technician opens an elevated Command Prompt during the brief working window and runs bcdedit /export D:\bcd-backup, followed by bcdedit /set {current} safeboot minimal.

After a restart, Windows starts in Safe Mode, where the faulty driver does not load. The technician removes the driver, installs the vendor’s stable release and then runs bcdedit /deletevalue {current} safeboot. The next restart returns to normal mode. The whole repair takes about twenty minutes and avoids reinstalling Windows, while the exported backup remains available if anything had gone wrong.