Pre-requisite Actions: Lets get your computer ready
Ensure that the latest Windows Assessment and Deployment Kit (ADK) is installed. This includes having the latest Deployment Tools and Windows Preinstallation Environment (WinPE) add-ons.
For downloading the latest Windows Assessment and Deployment Kit (ADK) and Windows Preinstallation Environment (WinPE) add-ons, visit the Microsoft Download Center.
Once the mitigation is applied your boot media will need have the Bootx64.efi Windows UEFI 2023 CA signed, otherwise Secure Boot will fail. To do this we need to mount the default WinPE.wim and extract the Bootx64.efi and other files.
Microsoft have provided manual steps here for reference however, I have produced a nice script. Once the script is complete we will have access to both Windows UEFI 2011 CA signed and Windows UEFI 2023 CA signed files or Pre and Post Remediation scenarios.
#Update these to suit your environment$MountDir ="C:\WinPE_x64_MountDir"#remove-item $WinPE_x64WorkSpace -Force#Default ADK Paths$ADKPath ="C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit"$ADKPathPE ="$ADKPath\Windows Preinstallation Environment"if (Test-Path-Path $ADKPathPE){Write-Host"Found ADK PE: $ADKPathPE"-ForegroundColor Green $ADKImage =Get-WindowsImage-ImagePath "$ADKPathPE\amd64\en-us\winpe.wim"-Index 1}else {Write-Host"Did not detect ADK in path $ADKPathPE"throw}if (!(test-path-path "$MountDir")){New-Item-Path $MountDir -ItemType Directory |Out-Null}#Mount WinPE Image To create Windows UEFI 2023 CA signed Windows PE boot media#https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive?view=windows-11Write-Host"Mounting winpe.wim from $ADKPathPE"-ForegroundColor GreenMount-WindowsImage-Path $MountDir -ImagePath "$ADKPathPE\amd64\en-us\winpe.wim"-Index 1|out-nullCopy-Item"$MountDir\Windows\Boot\EFI_EX\bootmgr_EX.efi""$ADKPathPE\amd64\Media\bootmgr.efi"-Force -VerboseCopy-Item"$MountDir\Windows\Boot\EFI_EX\bootmgfw_EX.efi""$ADKPathPE\amd64\Media\EFI\Boot\bootx64.efi"-Force -VerboseCopy-Item "$MountDir\Windows\Boot\Fonts_EX\chs_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\chs_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\cht_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\cht_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\jpn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\jpn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\kor_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\kor_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\malgun_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\malgun_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\malgunn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\malgunn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\meiryo_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\meiryo_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\meiryon_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\meiryon_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msjh_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msjh_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msjhn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msjhn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msyh_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msyh_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msyhn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msyhn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segmono_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segmono_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segoe_slboot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segoe_slboot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segoen_slboot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segoen_slboot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\wgl4_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\wgl4_boot.ttf" -Force -Verbose
#To create Windows UEFI 2011 CA signed Windows PE boot media#While we have the WinPE.wim mounted Ive extracted the Windows UEFI 2011 CA signed files to easily use in future. Copy-Item"$MountDir\Windows\Boot\EFI\bootmgr.efi""$ADKPathPE\amd64\Media\bootmgr.efi.2011"-Force -VerboseCopy-Item"$MountDir\Windows\Boot\EFI\bootmgfw.efi""$ADKPathPE\amd64\Media\EFI\Boot\bootx64.efi.2011"-Force -VerboseDismount-WindowsImage-Path $MountDir -save