3

Tried following this tutorial https://4sysops.com/archives/unlock-bitlocker-under-windows-pe/

But when I boot up my winpe image and try to run manage-bde I can "manage-bde is not recognized..."

Here are the packages I added to my Windows 10 x64 winpe (booting to an x64 windows 10 PC):

winpe-wmi.cab
winpe-scripting.cab
WinPE-PowerShell.cab
winpe-SecureBootCmdlets.cab
winpe-SecureBootStartup.cab
red888
  • 4,183
  • 18
  • 64
  • 111

5 Answers5

2

This dude had the same problem: http://www.eightforums.com/system-security/46543-how-enable-bitlocker-support-unlock-drive-winpe-5-a.html

I didn't create a separate subfolder like he did, but I can confirm this worked for me with the win10 PE image:

8) Final solution was to create a subdirectory called "BitLocker" in \Windows\System32, then copy C:\Windows\System32\manage-bde.exe and C:\Windows\System32\en-US\ into it. Then I performed the Commit to finalize and create my WinPE image.

9) Upon booting my WinPE environment, in the Command Prompt, I change to the "BitLocker" directory and run manage-bde.exe from there to unlock my BitLocker volumes. No errors.

red888
  • 4,183
  • 18
  • 64
  • 111
1

In order to get this to work, you have to load the necessary CAB files from C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs. Once those are loaded, you have to load the same CAB files from the C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us folder. Once I loaded both instances of the CAB files, the commands worked in WinPE.

1

It's easier to download Windows Media Creation tool https://www.microsoft.com/en-us/software-download/windows10

boot and start in the troubleshooting menu the command line.

user423564
  • 11
  • 3
1

Just open the "Windows kits"/"Deployment and Imaging Tools Environment" Command prompt (Run as Admin)

Create a BuildWinPE.CMD with the contents below and run it. It will even create an ISO:


@echo Copies winpe env to C:\WinPE_x64\
@Pause
copype.cmd amd64 C:\WinPE_x64
@echo Mounts winpe to C:\WinPE_x64\mount
@Pause
Dism /Mount-Image /ImageFile:"C:\WinPE_x64\media\sources\boot.wim" /Index:1 /MountDir:"C:\WinPE_x64\mount"
@echo Install WMI, .NET, Bitlocker & TPM support
@Pause
Dism /Image:"C:\WinPE_x64\mount" /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
Dism /Image:"C:\WinPE_x64\mount" /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FMAPI.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-EnhancedStorage.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
Dism /Image:"C:\WinPE_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
@echo Continue when done
@Pause
dism /unmount-wim /mountdir:"C:\WinPE_x64\MOUNT" /commit
MakeWinPEMedia /ISO /f C:\WinPE_x64 C:\WinPE_x64\WinPE_USMToffline.iso

0

The following commands helped me, you'll have to adapt to make it work for you.

  1. Mount the image file in your your WinPE directory.

    Dism /Mount-Image /ImageFile:"C:\winpe_x86\media\sources\boot.wim" /index:1 /MountDir:"C:\winpe_x86\mount"
    
  2. Add the packages WinPE-WMI, WinPE-SecureStartup, WinPE-EnhancedStorage and WinPE-Scripting. I don't know which package provides the manage-bde executable, but one of those does. Below I show the command for installation of WinPE-SecureStartup startup only. Please adapt it for others.

    Dism /Add-Package /Image:"C:\WinPE_x86\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-SecureStartup.cab"
    
  3. For the support pack to work, you need to also install at least one language pack for the associated package. Here I show an example of EN-GB version of the SecureStartup pack.

    Dism /Add-Package /Image:"C:\WinPE_x86\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-gb\WinPE-SecureStartup_en-gb.cab"
    
  4. Unmount and commit your packages.

    dism /unmount-wim /mountdir:"C:\WinPE_x86\MOUNT" /commit
    
  5. Make a bootable version of the image.

    MakeWinPEMedia.cmd  /UFD C:\winpe_x86 E:
    

    Note: MakeWinPEMedia can only be found in C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment or similar.

  6. Change BIOS to legacy mode if needed.

mforsetti
  • 2,666
  • 2
  • 16
  • 20