Due to code changes in Windows ADK 10 v2004 the MDT utility (Microsoft.BDD.Utility.dll) that detects BIOS or UEFI firmware types no longer works correctly, and detects BIOS-based machines as UEFI-based machines.
Update June 3, 2020: Microsoft released a hotfix for this issue. Basically a new version of Microsoft.BDD.Utility.dll: With this hotfix you don't need the below workaround: https://support.microsoft.com/en-us/help/4564442/windows-10-deployments-fail-with-microsoft-deployment-toolkit
Note: This issue happens for ConfigMgr (SCCM) too, but has been addressed in the HFRU for ConfigMgr 1910, as well as in ConfigMgr 2002. Also Windows 10 v2004 has this code change (see Symptom #2 later in this post).
Bare metal deployments will fail with the following error:
FAILURE ( 5616 ): 15299: Verify BCDBootEx
Litetouch deployment failed, Return Code = -2147467259 0x80004005
Failed to save environment to (80070057)
Not related to ADK 2004, but the same code change was done in Windows 10 v2004 too. The Apply Windows PE (BCD) action may fail during build and capture of a Windows 10 v2004 reference image, and cause either the following error after reboot, or just an endless loop showing "Loading files…":
Info: An unexpected error has occurred
Until an official fix is available, this temporary workaround gets the job done. Simply copy the below script to your deployment share scrips folder, and add it to your standard client task sequence in two locations:
- #1 Prior to the actions that formats the drive in the Preinstall / New Computer only node.
- #2 After the Apply Local GPO Package action.
Note: If using the separate sysprep and capture task sequence instead of a build and capture task sequence, add the script after the Set Phase action (see screenshot further down in this post). Thanks Sean Smith for providing that info.
Name: Fix UEFI Detection
Command Line: cscript.exe "%SCRIPTROOT%\FixUEFIDetection.wsf"
The script creates its own log file: FixUEFIDetection.log that can be used for troubleshooting. Or, simply add a pause before the script runs in the task sequence, and run it interactively via F8. Here is what I use to pause a task sequence (to resume, just exit the command prompt):
Action: Run Command Line
Name: Pause with Command prompt
Command Line: cmd /c start "cmd" /wait cmd