Let me start by saying what this isn't: it isn't a sales pitch. The tool is open source, MIT-licensed, and I make nothing from it. This is a write-up of what I learned building it, because I suspect a few of you have hit the same wall.
The failure modes
Three things kept breaking our fleet:
KB5034441 and successors. Microsoft pushed a WinRE update that required a larger recovery partition than most OEMs shipped. The update failed with 0x80070643, and the machines that failed had recovery partitions that were technically present but undersized by 50–200 MiB.
Device Encryption on Windows 11 24H2+. This one is nasty. The encryption service claims newly created partitions before the recovery type GUID can be applied. You create a recovery partition, it gets auto-encrypted, and reagentc /enable refuses with "Windows RE cannot be enabled on a volume with BitLocker Drive Encryption enabled." The machine has a recovery partition, but WinRE cannot use it.
VMD storage drivers. On 12th-gen Intel and later, the recovery image needs the Intel VMD driver to see the OS disk. If the deployed WinRE lacks it, Startup Repair and Reset this PC fail with INACCESSIBLE_BOOT_DEVICE. The recovery environment boots — it just can't see anything.
What I ended up building
A single-file PowerShell script that runs idempotently. On a healthy machine it takes the fast path: no WIM mount, no partition touch, no reagentc call. On a broken machine it rebuilds the recovery image from a normalized base, injects the correct OEM and VMD drivers, replaces the recovery partition if it's undersized, and re-registers WinRE.
The parts that took the most iteration:
The reagentc /disable → /enable window. For the duration of that window, WinRE is unregistered. If the machine loses power, it has no working recovery route. I moved everything that doesn't strictly require a disabled WinRE before the disable, and added a race detector immediately before the /disable call that aborts if Windows Update serviced the registered image during candidate preparation.
Target-volume BitLocker policy. reagentc's BitLocker check is on the volume it's being asked to enable, not on C:. The enable-only and dedicated-partition paths don't care about C:'s encryption state. Only the OS-fallback route does, because there the target volume is C:. This inverted the whole policy from what I originally designed.
Driver strip normalization. Every rebuild now strips the mounted image to zero third-party drivers, proven by re-enumeration, before injecting the current recipe. Without this, rebuild N depends on rebuild N−1 and third-party drivers accumulate silently across cycles.
Field data
The non-destructive paths are verified on a Dell Pro Max 16 (Core Ultra 7), two ASUS Vivobooks (both mid-encryption at 91%), and an ASUS PRIME H510M-D. The Dell ran a full rebuild with the Dell WinPE11 pack: 64 third-party drivers injected (49 of 49 matched), 1,000 MiB recovery partition rejected as undersized, new 1,100 MiB bucket created, reagentc /enable exit 0, DEDICATED. The ASUS machines completed the dedicated-partition path with C: actively encrypting and the new partition was not re-claimed by Device Encryption.
Honest limitations
The strip stage has not been exercised against a source image with a non-empty third-party driver set in production. The field runs all had clean source images, so the strip was a no-op.
The destructive partition paths have not been exercised under the current code on physical hardware. The v45 VM test is the closest thing to a destructive-path regression run.
The one residual corner is documented: a post-deletion failure on an encrypted C: can leave the machine with neither a dedicated recovery partition nor OS-fallback. It's gated on a deliberate failure test.
Questions for the crowd
How are you handling the KB5034441 class of failures? Manual partition resize, scripted, or are you seeing Microsoft fix it on newer images?
Device Encryption auto-encryption — has anyone found a reliable way to prevent the service from claiming a newly created recovery partition other than applying the type GUID at creation and hoping?
VMD driver injection — is anyone maintaining their own VMD package set, or are you leaning on the OEM WinPE packs?
If there's interest, I'm happy to share the partition lifecycle doc or the log signatures for specific failure modes. The repo is github.com/ArthurJDurand/WinRE-Manager if you want to poke at the code. I'm more interested in the failure modes than in the tool — the recovery partition lifecycle has more edge cases than I expected.