Here at the company I work for, we have a number of offices scattered around the world. Computers imaged at each office have to be placed in an OU specific to each office, have an office-specific Local Admin password set, and have the timezone set. Originally, we had a separate Task Sequence for each office, and we’d have to pick the right one. Unfortunately, this also meant that we had at least 5 of each Task Sequence, which made updating software packages pretty tedious, as we’d then have to update them in each TS.
I didn’t want to create an HTA to have the local IT guy manually select an office, and I was also averse to having the local IT guy enter specific values in the form of a Task Sequence Variable. Our offices each have well-defined subnets, so I knew there’d have to be a way to have the task sequence automatically apply these regional settings based on the IP address. Here’s how to do it (note: these instructions are for SCCM 2007; I’m not sure how they’d need to be modified for SCCM 2012 at this time):
- Start by closing out of the Configuration Manager Console on the Site Server
- Download Microsoft Deployment Tools (MDT) 2012 and install on the Site Server.
- After installing, go to Start > All Programs > Microsoft Deployment Toolkit > Configure ConfigMgr Integration.
- You’ll want to select the radio button for Install the MDT extensions for Configuration Manager, and check the boxes for Install the MDT console extensions for ConfigMgr 2007 and Add the MDT task sequence actions to a ConfigMgr server:
- Next, re-launch the Configuration Manager Console and create a new package (I just called mine “MDT”). You’ll want to set the source to the location of the “Templates\Distribution” folder within your MDT installation (using the UNC path). For me, that was “\\[SiteServer]\c$\Program Files\Microsoft Deployment Toolkit\Templates\Distribution”.
- Distribute this package (no need to create any programs here) to your Distribution Points as normal.
- Open up the Task Sequence you want to modify. I created a new group within this TS and called it “Regional Settings,” and put all the following steps within that group just for organization.
- In the Task Sequence Editor, select Add > MDT > Use Toolkit Package. Click on this step and add your Toolkit Package by clicking the Browse button and locating your MDT package.
- Add another step: Add > MDT > Gather, and specify for that step to Gather only local data (do not process rules).
- Now, let’s create a group for each region/office. Each group should contain the Apply Windows Settings and Apply Network Settings steps, with Local Admin password, Time Zone, and OU set accordingly (and any other region-specific settings; I’m working on having the task sequence install a Language Pack for our German office as well, but haven’t gotten that far yet). I also included a Set Task Sequence Variable step called “Set Location Variable” in which I create a TS Variable called “OSDLocation” and assign a specific two-letter code, because I’ll probably eventually start assigning specific software titles to specific offices as well.
- For each group, click the Options tab and click Add Condition. First, we’ll add an If Statement, to run if Any conditions are true.
- Under that If Any statement, click Add > Task Sequence Variable. The Variable we’re going to be looking at is called DefaultGateway001, and we’ll want to set it to equal whatever this office’s Default Gateway is. Some of our offices have multiple possible Default Gateways, so you’ll just want to set this for any possible Default Gateway in each office.
- Test your Task Sequence! It should image successfully, and show up in the correct OU, with the right Time Zone and Local Admin password.
You’re all set! If you have any trouble with any part of this, please leave a comment below!