By running this script from a USB flash drive before recovering your Windows 11 environment, it will back up your BitLocker key, suspend recovery, and provide a safe recovery environment.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Prepare_Reset.bat 787B

12345678910111213141516171819202122232425
  1. @echo off
  2. setlocal
  3. cd /d %~dp0
  4. echo ===========================================
  5. echo BitLocker Recovery Key Backup & Suspend
  6. echo ===========================================
  7. :: 1. Export Recovery Key to the same folder as this batch
  8. echo [1/2] Exporting Recovery Key...
  9. manage-bde -protectors -get C: > "%~dp0%COMPUTERNAME%_BitLocker.txt"
  10. :: 2. Suspend BitLocker protection (RebootCount 0 = stays suspended)
  11. echo [2/2] Suspending BitLocker...
  12. powershell -Command "Suspend-BitLocker -MountPoint 'C:' -RebootCount 0"
  13. echo.
  14. echo -------------------------------------------
  15. echo COMPLETED!
  16. echo Please check if "%COMPUTERNAME%_BitLocker.txt" exists.
  17. echo You can now proceed with "Reset this PC".
  18. echo -------------------------------------------
  19. pause
  20. start ms-settings:recovery