Windows Recovery Environment (Windows RE) | Microsoft Learn

Windows Recovery Environment (WinRE) is a recovery environment based on Windows Preinstallation Environment (Windows PE) that repairs common causes of unbootable Windows installations. WinRE can be customized with extra drivers, languages, Windows PE optional components, and troubleshooting/diagnostic tools. By default it is included with Windows 10 and Windows 11 desktop editions and Windows Server 2016 and later.

What's new with WinRE for Windows 11

  • Most tools can now run within WinRE without selecting an administrator account and entering its password. Encrypted files remain inaccessible unless the user has the decryption key.

  • Advanced startup behavior was updated so Ease of Access features (for example Narrator) can be enabled in the recovery environment when booted from Settings > Update & Security > Recovery > Advanced startup ("Restart now").

What's new with WinRE for Windows 10

  • Media created with Windows Imaging and Configuration Designer (ICD) installs a dedicated WinRE tools partition on both UEFI and BIOS devices, located immediately after the Windows partition.

  • Custom tools added to the WinRE Advanced startup menu:

    • Can only use optional components present in the default WinRE tools.

    • Must be placed in \Sources\Recovery\Tools to persist through future WinRE upgrades.

  • Adding languages to push-button reset tools now requires the WinPE-HTA optional component.

Tools included in WinRE

  • Automatic repair and other troubleshooting tools — see Windows RE Troubleshooting Features.

  • Push-button reset (Windows desktop editions) — lets users repair PCs while preserving data and customizations. See Push-Button Reset Overview.

  • System image recovery (Windows Server editions) — restores entire hard drives. See Recover the Operating System or Full Server.

  • You can also build custom recovery solutions using the Windows Imaging API or DISM API.

Entry points into WinRE Users can launch the Advanced startup menu to access WinRE via:

  • Shift + Restart from the login screen (hold Shift while clicking Restart).

  • Settings > Update & security > Recovery > Advanced startup > Restart now.

  • Booting from recovery media.

  • OEM-configured hardware recovery button or button combination.

WinRE automatically starts after certain failures, e.g. two consecutive failed boot attempts, two unexpected shutdowns within two minutes of boot completion, Secure Boot errors (except Bootmgr.efi issues), or BitLocker errors on touch-only devices.

Advanced startup menu From this menu users can:

  • Start recovery, troubleshooting, and diagnostic tools.

  • Boot from a device (UEFI only).

  • Access the Firmware menu (UEFI only).

  • Choose which OS to boot (if multiple OSes are present).

Note: You can add one custom tool to the Advanced startup menu. See Add a Custom Tool to the Windows RE Advanced startup Menu.

Security considerations

  • If Advanced startup is launched from Windows and a WinRE tool is selected, Windows requires credentials of a local administrator account.

  • Many WinRE tools can be run without selecting an administrator account; encrypted volumes remain inaccessible without the proper key.

  • Networking is disabled by default in WinRE. Enable networking only when needed for security.

Customizing WinRE

  • You can add Windows PE optional components (packages), languages, drivers, and custom tools.

  • The base WinRE image includes components such as Microsoft-Windows-Foundation-Package, WinPE-EnhancedStorage, WinPE-Scripting, WinPE-HTA (added in Windows 10), and others.

  • Minimize added languages/drivers/tools for performance; constrained by available memory.

Hard drive partitions

  • When Windows Setup is used, WinRE is prepared and the winre.wim initially resides in \Windows\System32\Recovery on the Windows partition. During specialize configuration, winre.wim is copied into the recovery tools partition so WinRE can boot even if the Windows partition is damaged.

  • When deploying by applying images, you must configure partitions manually. WinRE must reside on an NTFS-formatted partition.

  • Storing the baseline winre.wim in a separate recovery partition (directly after the Windows partition) is recommended so WinRE remains available if the Windows partition is encrypted (BitLocker) and so Windows can resize partitions if needed.

Steps performed by Windows Setup regarding WinRE

1

Partition preparation during Windows Setup

Windows prepares the hard drive partitions to support WinRE.

2

Initial placement of winre.wim

Windows places winre.wim in the Windows partition at \Windows\System32\Recovery.

3

Final placement during specialize

During the specialize configuration pass, winre.wim is copied into the recovery tools partition so recovery can boot if the Windows partition fails.

Memory requirements

  • To boot WinRE directly from memory (RAM disk boot), a contiguous portion of physical RAM large enough to hold winre.wim must be available. Manufacturers should ensure firmware reserves memory at the beginning or end of physical address space to optimize use.

Updating the on-disk WinRE

  • WinRE can be serviced as part of OS rollup updates; not all rollups update WinRE.

  • Updates replace the existing winre.wim with a newer image and migrate or inject:

    • Boot-critical and input device drivers from the full OS.

    • Customizations under \Sources\Recovery from the mounted winre.wim.

  • Items not migrated:

    • Drivers present only in the existing WinRE image but not in the full OS.

    • Windows PE optional components not in the default WinRE image.

    • Language packs for Windows PE and optional components.

  • If the new image doesn't fit the existing recovery partition:

    • If the recovery partition is immediately after Windows, Windows may shrink the Windows partition and expand the recovery partition.

    • If not immediately after Windows, Windows may shrink the Windows partition and create a new recovery partition, orphaning the old one.

    • If partition changes fail, the new winre.wim may be installed onto the Windows partition and the existing recovery partition orphaned.

  • Important: Customizations must not depend on optional components not in the default WinRE image (e.g., WinPE-NetFX). WinPE-HTA was added to the default image in Windows 10 to support customizations.

Known issue

  • If the GPO "Accounts: Block Microsoft accounts" is set to "User can't add or log with Microsoft account", attempting System Restore in WinRE can fail with: "You need to sign in as an administrator to continue, but there aren't any administrator accounts on this PC."

  • Workaround: Do not set that GPO to block Microsoft accounts, or set the MDM policy Security/RecoveryEnvironmentAuthentication to 2.

See also (selected links)

  • Customize Windows RE | Deploy Windows RE

  • REAgentC Command-Line Options

  • Windows RE Troubleshooting Features

  • Add a Custom Tool to the Windows RE Advanced startup Menu

  • Add a Hardware Recovery Button to Start Windows RE

  • Push-Button Reset Overview

Additional resources

  • Employ file recovery in Windows client — Training module

  • Microsoft 365 Certified: Endpoint Administrator Associate — Certification

Last updated: 02/09/2023

For full details, tool references, and procedural guidance see the original Microsoft documentation linked throughout this summary.