I want to first stress that I am very new to SCCM and still very much trying to figure a lot of things out.
We're moving away from ghost and I'm trying to leverage SCCM CM to do the heavy lifting when it comes to imaging. The company wouldn't spring for a deployment solution (like Altiris for example) since SCCM is already included in our agreement, but no one here wants to deal with SCCM. (They've had some dealings with it in the past, and they hated it apparently.) Unfortunately for me, I'm the desktop architect guy (imaging, applications, login script, gpo etc) so it all falls on me, and I'd like to simplify my job!
I have some experience with MDT2010/2012 and am trying to reproduce a lot of what I did in my test MDT environment, which would be to deploy an image, set the computer name (dynamically based on the format we use here which is model-serialnumber), specify the proper time zone and keyboard layout (en-GB, en-US etc) based on gateway and so on.
In MDT one could do this via User Exit scripts and customizing the customsettings.ini, but I'm having a hard time figuring this out in SCCM 2012. If it all has to be done with scripts, I don't know which is the preferred/proper method to launch the script:
- When editing boot image properties you can enable prestart commands
- When creating task sequence media you can customize it to enable a prestart command
- When creating task sequence media you can customize it to add a package
- Run an application during the task sequence
- Run a package during the task sequence
- Run Command Line during the task sequence
- Go to Task Sequence properties > Advanced > Run another program first > Select package
As a result, I'm totally confused and unclear on why I would consider one over the other. So...
- How do I properly call/execute scripts (batch, vbscript, powershell etc) so they run as soon as the PE Environment loads? (Before the task sequence wizard)
- How to properly call/execute scripts from a Task Sequence?
- If scripts should be a packaged, do I need to create a program to execute it?
- How do to create new environment variables for use during the Task Sequence? (but creating '_MyNewVar' and using it later down the line)