SCCM OSD FrontEnd

SCCM OSD Frontend

Introduction

When migrating OS deployment solution from Microsoft deployment toolkit to SCCM, the very first challenge for the administrators is to take input during OS deployment. These inputs are specific to the organization’s
need. Some of these are Computer name, Locale, Keyboard, Organization Units,Time zone etc.

MDT light-touch installation by default provides GUI for all possible inputs for most of the scenarios, this can easily be controlled and manipulated with Bootstrap.ini and Customsettig.ini files. SCCM out-of-the-box does
not provide this feature. That being said, it is also important to mention here that OSD in SCCM can also be configured to prompt for input using Collection Variables. Another option is to integrate MDT with SCCM and make use of User-Driven Installation feature. Integrating MDT with SCCM gives much more
flexibility when creating an OSD task sequence. This article from Microsoft is highly recommended understand SCCM and MDT integration.

However, when ZTI and UDI are not feasible solutions for your organization, SCCM OSD Frontend comes into picture is that make things easier.

Why OSD Frontend

Let us be realistic and accept the fact that integrating MDT with SCCM does add many enhancements to deployment, but it also adds more complexity and scope for troubleshooting if something goes wrong. It is a choice that administrator has to make what makes more sense given all the requirements and limitations if any.

It’s much easier to be presented with a frontend at the beginning of OSD which takes all the inputs required and based on the same task sequence can perform necessary actions. Frontend GUI makes task sequence dynamic and flexible.

How to create OSD Frontend

VBScript, HTA (HTML Application), PowerShell (along with WinForms and WPF components of .NET) are some of tools that can be used to create your own frontend GUI tailored to your own requirements.

With a quick Google search for GUIs, you may find something that suits your requirement and can be used out-of-the-box, or you can modify the code a bit as per your requirement.

Frontend GUI is launched in WinPE phase of SCCM OSD. WinPE is lightweight and minimal operating system that provides environment to OS deployment and recover. If you are interested this article talks about WinPE in great details.

No matter which scripting language is used create the GUI, its essential to understand how these values taken as input via GUI is passed to task sequence variable dynamically. This is done by creating an instance of task sequence environment COM automation object Microsoft.SMS.TSEnvironment

I would recommend go through these articles to get better understanding on how to use Microsoft.SMS.TSEnvironment COM object to manipulate task sequence variables.

https://docs.microsoft.com/en-us/mem/configmgr/develop/osd/how-to-use-task-sequence-variables-in-a-running-task-sequence 

https://docs.microsoft.com/en-us/mem/configmgr/develop/osd/how-to-set-an-operating-system-deployment-task-sequence-variable 

Prerequisites to launch OSD Frontend in WinPE

SCCM boot image by default does not support .NET or HTA based GUIs or PowerShell scripting. These components are to be injected into the SCCM boot image so that Frontend GUI can be launched in WinPE phase.

  • HTML (WinPE-HTA)
  • Microsoft .NET (WinPE-NetFx)
  • Windows PowerShell (WinPE-PowerShell)
  • Scripting (WinPE-Scripting)

How to Launch OSD Frontend in WinPE

Now, you have created your own custom GUI and added required components to the boot image. Next question would be how to launch this GUI in WinPE. The answer, it to Simply add “Run Command Line” task sequence step and type the command that will launch the GUI.

But it not that simple, because SCCM task sequence it designed to suppress any prompts, pop ups or notification window. Task Sequence runs with SYSTEM account context which has its own isolated environment, therefore even if “Run Command Line” step has successfully launched the GUI process, it won’t be visible.

To overcome this, ServiceUI.exe something widely used. ServiceUI.exe is component of Microsoft deployment Toolkit and is located here:

C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Tools\x64

And 

C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Tools\x86

 

This is the same tool used in UDI (User-Driven Installation) scenario in order to launch customized wizard. Addition information of how to ServiceUI.exe to launch your GUI can be found here

Conclusion

I tried to summarize the process an SCCM administrator, in general has to go through when implementing OSD via SCCM which requires user input. I have also provided links to additional resources which will help if you wish to explore in detail. Needless to say, how intelligent, sophisticated, intuitive or stunning the SCCM OSD frontend is, that completely depends on your programming and scripting skills.

Hope this helps you in making or choosing your own OSD Frontend tool. If you have any further questions/comments/feedback, please feel free to reach me out.

Thanks for Sharing :)

This Post Has 4 Comments

  1. Ant

    Very well put together and this has helped me put together my first working GUI. How would you turn the script into an .EXE and run it in WinPE?

    1. Premendra Kumar Patel

      Thanks for the comment and I am glad to know that the post was helpful.
      Methods to compile/convert script to executable depends on the scripting language being used, there are tool available. PS2EXE-GUI can be used to convert PS1 scripts to EXE. Create an SCCM package copying EXE along with ServiceUI.exe in a folder. Use this package with “Run Command line” task sequence step under WinPE and call ServiceUI.exe to launch the EXE.
      This post might give you an idea on how to use ServiceUI.exe to launch another executable.

      Hope this helps!

  2. sridhar

    simply suberb

  3. Peace

    Good morning,

    Excellent Post, thank you very much for taking the time to explain us all of this.

    I have a question, can you please confirm if you are still available? I would like to post a question but i dont know if you are still helping the IT World.

    Thank you and best regards,

    Peace

Leave a Reply