Automate the Process of Building and Capturing a Windows 10 1703 Reference Image: The CustomSettings.ini Rules

We left the previous post in this series after having created our build and capture task sequence and having generated a boot image ISO.

As I explained in the post, to build and capture our reference image you will use the boot image ISO to fire up a virtual machine into the MDT Deployment Wizard where you go through a number of wizard panes. This is normally a manual process where you have to enter the keyboard language, region, time zone, etc and select the task sequence to run and whether you want to capture an image.

This post is all about eliminating this manual process with the help of the CustomSettings.ini rules which essentially providing answers to the wizard panes and thereby skipping this step altogether.

Set the Customsettings.ini Rules

To configure your rules right-click on your deployment share in the Deployment Workbench and select Properties. In the Rules tab, replace any existing rules with the rules below:

[Settings]
Priority=MacAddress, Default
Properties=MyCustomProperty

[Default]
_SMSTSORGNAME=Me, Myself and IT
_SMSTSPackageName=%TaskSequenceName%
SkipTaskSequence=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipDomainMembership=YES
SkipUserData=YES
SkipComputerBackup=YES
SkipBitLocker=YES
SkipRoles=YES
SkipComputerName=YES
SkipPackageDisplay=YES
SkipLocaleSelection=YES
SkipTimeZone=YES
SkipApplications=YES
SkipSummary=YES
SkipFinalSummary=YES
UserDataLocation=NONE
ComputerBackupLocation=NETWORK
OSInstall=Y
AdminPassword=Adm1nPassw0rd
TimeZoneName=GMT Standard Time
UILanguage=en-GB
UserLocale=en-GB
KeyboardLocale=en-GB
JoinWorkgroup=WORKGROUP
WSUSServer=http://mni-wsus01:8530
ApplyGPOPack=NO
FinishAction=LOGOFF

[00:15:5D:00:0B:04]
_SMSTSPackageName=Naz’s Image Factory – Windows 10 1607 Reference Image
TaskSequenceID=BUILDW10-1703
BackupShare=\\MNI-MDT01\MDTBuildLab$
BackupDir=Captures
BackupFile=%TaskSequenceID%_#day(date) & “-” & month(date) & “-” & year(date)#.wim
SkipTaskSequence=YES
DoCapture=YES
SkipCapture=YES
SkypSummary=YES

I’d like to draw your attention to a couple of points in the rules above:

The MAC address

Notice that we’ve got a few rules defined underneath a MAC address section, as reproduced below:

[00:15:5D:00:0B:04]
_SMSTSPackageName=Naz’s Image Factory – Windows 10 1607 Reference Image
TaskSequenceID=BUILDW10-1703
BackupShare=\\MNI-MDTSERVER\MDTBuildLab$
BackupDir=Captures
BackupFile=%TaskSequenceID%_#day(date) & “-” & month(date) & “-” & year(date)#.wim
SkipTaskSequence=YES
DoCapture=YES
SkipCapture=YES
SkypSummary=YES

The idea is that when we fire up a virtual machine with this specific MAC address and boot using the boot image, the MDT Deployment Wizard will match the VM’s MAC address with the MAC address in the CustomSettings.ini and process the rules provided. So in this case it will proceed to run the task sequence ID that matches “BUILDW10-1703”, capture the image and save it with a name such as BUILDW10-4-5-17.wim.

If you gave your task sequence a different ID then change it in the rules. Similarly you can change the Mac address in the rules if you wanted to (if you do, make a note of it since you’ll need it in the next post).

Installing Updates

You may remember that we enabled the Windows Update steps in our build and capture task sequence in Part 3 of this series. The following rule tells MDT where to download the updates from:

WSUSServer=http://mni-wsus01:8530

When running the task sequence MDT will inject this WSUS server address into the registry so when the Windows Update steps are run it will do a scan against the server to patch your reference image. Personally I have a dedicated WSUS server for patching my reference images. You can get a WSUS server up and running in no time using instructions available at over at virtuallyboring.com

Note: Ignore the Group Policy section in the instructions as you won’t be needing that to patch your reference image – the rule in the CustomSettings.ini will do that job for you. Once WSUS is installed and configured you’ll need to approve some updates to the “Unassigned computers” group.

The Bootstap.ini Rules

There’s actually one additional set of rules we need to provide before proceeding to our next post. The first step before the MDT Deployment Wizard runs is to authenticate yourself but, again, we can skip this step by providing the credentials in the Bootstrap.ini rules.

On your deployment share properties, click on “Edit Bootstrap.ini” button on the Rules tab. Replace any existing rules with the following:

[Settings]
Priority=Default

[Default]
DeployRoot=\\MNI-MDTSERVER\MDTBuildLab$
UserID=MDTUser
UserDomain=EMENEYE
UserPassword=MDTPassword
KeyboardLocale=en-GB
SkipBDDWelcome=YES

The DeployRoot refers to the full path to your MDT deployment share you created in step 1 in the previous post. Change the credentials to suit your own environment. This should be a user account that has full security and share permissions to your deployment share and also the share your captured image is to be saved in.

Next Post

In the next post we’ll use PowerShell to create a VM with the MAC address in the CustomSettings.ini rules above and boot it using the boot image ISO, which will then proceed to build and capture our reference image as per our rules automatically.

Advertisements

2 thoughts on “Automate the Process of Building and Capturing a Windows 10 1703 Reference Image: The CustomSettings.ini Rules

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s