Jörgen Nilsson have a great post here on how to do the BIOS to UEFI switch on one task sequence in SCCM. There was a couple times during his guide where I had to try different things before I could get it to work. So that is why I made this post.
All the credit goes of course to Jörgen Nilsson!
x1. Download copy.cmd
x2. Download TSEnv2-126.96.36.199 from 1E (http://info.1e.com/website-freetools-1e-tsenv2)
1. Localize your “\\SERVER\DRIVE$\Microsoft Configuration Manager\OSD\bin”.
2. Copy the corresponding version of TSEnv2.exe to the x64 as well as the i386 subfolder.
3. Open \\SERVER\DRIVE$\Microsoft Configuration Manager\bin\X64\osdinjection.xml in notepad or similar.
Remark – there’s only one osdinjection.xml, not one per architecture. Remember to Backup osdinjection.xml before editing.
4. There’s already a native file with similar name (tsenv.exe). Search for that and copy the section, thus avoiding misspelling.
Copy (duplicate) the section and replace the file name:
5. Save and close “osdinjection.xml”. Next time a boot image is updated on distribution points TSEnv2.exe will be included.
6. Update the boot image on the distribution points or create a new Boot image.
7. Open the SCCM console
17. Mount the iso file you just created
18. Create a folder on your SCCM package share and called “UEFI_To_Bios”
19. Copy all the files from the iso you mounted in step 17 to the folder that you just created on the SCCM package share.
25. Replicate the package to your distribution points
26. Open your task sequence and create a new group called “Transform to UEFI” as the first step in the task sequence.
28. Create the BIOS settings and folder structure as descripted in this post
Command: copy.cmd %OSDisk%
”OSDisk” contains the drive letter and tells copy.cmd where to put the content.
31. Create another “Run Command Line” step and call it “Set _SMSTSServiceStartType to auto”
Command: TSEnv2.exe set _SMSTSServiceStartType=auto
Command: TSEnv2.exe set _SMSTSBootUEFI=true