Confirm that you are on UEFI
**$env:firmware_type** reports the boot mode of the running system. On a BIOS machine the firmware section does not exist and the cmdlets below fail.
$env:firmware_type
Confirm-SecureBootUEFI
bcdedit /enum firmware
The UEFI boot order is a firmware setting Windows can read and rewrite while it runs. That saves a trip into the setup screen when a second drive or a USB device should start first.
Read the firmware entries with **bcdedit /enum firmware**, change the order with **bcdedit /set {fwbootmgr} displayorder**, and keep an export of the store before you touch it.
**$env:firmware_type** reports the boot mode of the running system. On a BIOS machine the firmware section does not exist and the cmdlets below fail.
$env:firmware_type
Confirm-SecureBootUEFI
bcdedit /enum firmware
**{fwbootmgr}** is the firmware's own list, separate from the Windows boot manager. Each entry has an identifier and a description that the firmware shows on screen.
bcdedit /enum {fwbootmgr}
bcdedit /enum firmware | findstr /i "identifier description"
**/export** keeps the entries and their order. A wrong displayorder leaves a machine that boots nothing until the firmware setup is opened by hand.
bcdedit /export C:\bcd-firmware-backup
Get-Item C:\bcd-firmware-backup | Select-Object Name,Length
**/addfirst** moves an identifier to the top, **/addlast** to the bottom. The identifier comes from the enum output and includes the braces.
bcdedit /set {fwbootmgr} displayorder {1a2b3c4d-0000-0000-0000-000000000000} /addfirst
bcdedit /enum {fwbootmgr}
bcdedit /enum firmware | findstr /i "identifier description"
Some boards ignore the Windows order and keep their own preference list. The recovery menu opens the firmware setup without hunting for the Del key at boot.
shutdown /r /o /t 5
:: Troubleshoot > Advanced options > UEFI Firmware Settings > Restart
:: in the firmware: Boot tab > Boot Option Priorities
A reboot is the only test. If the wrong entry starts, boot back into Windows from the firmware menu and import the backup.
Restart-Computer
bcdedit /enum {fwbootmgr}
# if the order is wrong
bcdedit /import C:\bcd-firmware-backup
The machine booted in legacy mode. Convert the disk and switch the firmware to UEFI before the firmware store appears.
The firmware keeps its own priority list and rewrites it. Set the order in the firmware setup instead, then check whether it sticks.
The shell is not elevated, or Secure Boot policy locks the entries. Try again as administrator; on a managed device the policy wins.
Firmware keeps stale entries. Remove it with bcdedit /delete {identifier} from the firmware store.
No. The firmware picks the boot manager; the Windows menu then picks between Windows installations. Two lists, two settings.
Not permanently. A wrong order means the next boot goes to the wrong device, and the firmware setup always offers a manual selection.
Often yes. Re-check the order after a BIOS update and after a mainboard battery replacement.
Import the exported store with bcdedit /import C:\bcd-firmware-backup, or move the old entry back to the front with bcdedit /set {fwbootmgr} displayorder {identifier} /addfirst.
Free · no account needed · tracks your progress