BIOS to UEFI switch in one task sequence


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- from 1E (

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.

First hit when searching should give this:image


Copy (duplicate) the section and replace the file name:



The result should look like this:  image


Repeat for x64 (second hit when searching for tsenv.exe):image

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

8. Click on “Create a Task sequence Media” (\Software Library\Overview\Operating Systems\Task Sequences)image

9. Choose “Bootable media” and click “Next”image


10. Select “Site-based media” and click “next”.image


11. Select “CD/DVD set” and click “Next”image


12. Remove the check mark in “Enable unknown computer support” and “Protect media with a password” and click “Next”.image


13. Choose your boot image, Distribution point, Management point and click “Next”.image


14. Click “Next”.image


15. Click “Next”.image


16. Click “Close”.image

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.

20. Copy the file “copy.cmd” (The one that you downloaded as step x1) to the root of the folder you created in step 18image


21. Create a package in SCCM. Call it “UEFI to Bios” and choose the folder you created in step 18 as Source Folder. Click “Next”.image


22. Choose “Do not create a program” and click “Next”.image


23. Click “Next”.image


24. Click “Close”image

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.

27. Create the following condition on the “Transform to UEFI” folder: _SMSTSBootUEFI equals False image


28. Create the BIOS settings and folder structure as descripted in this postimage


29. Use a standard “Format and Partition Disk” step to create a GPT disk with a minimal UEFI-compatible partition. The automatically assigned drive letter will be stored in “OSDisk”.image



30. Add “Run command line” step called “Copy Boot Media To Disk”image

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

32. Add a “Restart Computer” step.image

33. Add another “Run Command Line” step and call it: “SET _SMSTSBootUEFI to true”image

Command: TSEnv2.exe set _SMSTSBootUEFI=true


That’s it.