The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Back to Basic–CustomSettings.ini–Sample 2

Posted by Mikael Nystrom on March 6, 2013

Over the years I have done a few customsettings.ini file configurations. Some for LTI, some for ZTI. I have done a bunch of demos during class, sessions and for customers, but I realize I have never published them, and since my blog post Back to Basic – Custom Settings Explained is the most read post I have done (it has been on the top 10 list since it was published) I decided to publish the rest of them

Scenario:

You are about to deploy virtual machines using LiteTouch (Some parts will work in ZeroTouch)

Requirements:

  • Machines with a certain BIOS version need to install an application
  • Model names should be normalized
  • The computer name should be generated based on prefix and the MAC Address
  • The computer prefix should be based on the normalized model name
  • The OU location should be based on the normalized model name

Solution:

[Settings]
Priority=HardwareInfo, MakeAlias, ModelAlias,SMBIOSBiosVersion,Default, SetOSD
Properties=ModelAlias,MakeAlias,SMBIOSBiosVersion,MacAlias,OSDPrefix,MachineOULocation

[HardwareInfo]
UserExit=AliasUserExit.vbs
MakeAlias=#SetMakeAlias()#
ModelAlias=#SetModelAlias()#
SMBIOSBIOSVersion=#SetSMBIOSBIOSVersion()#
MacAlias=#SetMacAlias()#

[68SCFVerF28]
Applications001={50ccee5b-973d-44cc-9d66-fbe506d9852b}

[Default]
OSInstall=Y
OSDPrefix=PC
MachineOULocation=Unknown

[Hyper-V2008R2]
OSDPrefix=VM
MachineOULocation=VMs
DoNotCreateExtraPartition=YES

[HP EliteBook 8540w]
OSDPrefix=HP
MachineOULocation=LapTops

[HP EliteBook 8460p]
OSDPrefix=HP
MachineOULocation=LapTops

[SetOSD]
OSDComputername=%OSDPrefix%-%MacAlias%
MachineObjectOU=OU=%MachineOULocation%,OU=WorkStations,OU=ViaMonstra,DC=corp,DC=viamonstra,DC=com

BDD.log:

Added new custom property MODELALIAS
Added new custom property MAKEALIAS
Added new custom property SMBIOSBIOSVERSION
Added new custom property MACALIAS
Added new custom property OSDPREFIX
Added new custom property MACHINEOULOCATION
Using from [Settings]: Rule Priority = HARDWAREINFO, MAKEALIAS, MODELALIAS,SMBIO
SBIOSVERSION,DEFAULT, SETOSD
—— Processing the [HARDWAREINFO] section ——
UserExit: started: SECTION BEFORE HARDWAREINFO
User exit “\\HOST03\MDTLab$\Scripts\AliasUserExit.vbs” called successfully, skip
= False.
UserExit: Running function SetModelAlias
UserExit: Make is now Hewlett-Packard
UserExit: Model is now HP EliteBook 8460p
UserExit: Win32_ComputerSystemProduct Version: A0001D02
UserExit: Win32_BIOS Version: HPQOEM – f
UserExit: Alias rule not found.  ModelAlias set to Model value.
UserExit: ModelAlias has been set to HP EliteBook 8460p
UserExit: Departing…
Property MODELALIAS is now = HP EliteBook 8460p
Using from [HARDWAREINFO]: MODELALIAS = HP EliteBook 8460p
UserExit: Running function SetMakeAlias
UserExit: Make is now Hewlett-Packard
UserExit: Alias rule not found.  MakeAlias will be set to Make value.
UserExit: MakeAlias has been set to Hewlett-Packard
UserExit: Departing…
Property MAKEALIAS is now = Hewlett-Packard
Using from [HARDWAREINFO]: MAKEALIAS = Hewlett-Packard
UserExit: Running function SetSMBIOSBIOSVersion
UserExit: SMBIOSBIOSVersion has been set to 68SCFVerF28
UserExit: Departing…
Property SMBIOSBIOSVERSION is now = 68SCFVerF28
Using from [HARDWAREINFO]: SMBIOSBIOSVERSION = 68SCFVerF28
UserExit: Running function SetMacAlias
UserExit: MacAddress001 is now 00:15:5D:01:83:00
UserExit: SetMacAlias has been set to 00155D018300
UserExit: Departing…
Property MACALIAS is now = 00155D018300
Using from [HARDWAREINFO]: MACALIAS = 00155D018300
UserExit: started: SECTION AFTER HARDWAREINFO
User exit “\\HOST03\MDTLab$\Scripts\AliasUserExit.vbs” called successfully, skip
= False.
—— Processing the [Hewlett-Packard] section ——
—— Processing the [HP EliteBook 8460p] section ——
Property OSDPREFIX is now = HP
Using from [HP EliteBook 8460p]: OSDPREFIX = HP
Property MACHINEOULOCATION is now = LapTops
Using from [HP EliteBook 8460p]: MACHINEOULOCATION = LapTops
—— Processing the [68SCFVerF28] section ——
Property APPLICATIONS001 is now = {50ccee5b-973d-44cc-9d66-fbe506d9852b}
Added value from [68SCFVerF28]: APPLICATIONS = {50ccee5b-973d-44cc-9d66-fbe506d9
852b}
—— Processing the [DEFAULT] section ——
Property OSINSTALL is now = Y
Using from [DEFAULT]: OSINSTALL = Y
—— Processing the [SETOSD] section ——
Property OSDCOMPUTERNAME is now = HP-00155D018300
Using from [SETOSD]: OSDCOMPUTERNAME = HP-00155D018300
Property MACHINEOBJECTOU is now = OU=LapTops,OU=WorkStations,OU=ViaMonstra,DC=co
rp,DC=viamonstra,DC=com
Using from [SETOSD]: MACHINEOBJECTOU = OU=LapTops,OU=WorkStations,OU=ViaMonstra,
DC=corp,DC=viamonstra,DC=com
—— Done processing c:\csdemo\Samples\Settings based on UserExit-Alias.ini –
—-
Remapping variables.
Property TaskSequenceID is now =
Property DeploymentType is now =
Finished remapping variables.
ZTIGather processing completed successfully.

Remark:

In this case we use a user exit script to collect additional information from WMI and set is variables in MDT to be used later, one of the things is collection the BIOS version and normalize it and then we use that as a priority section that will add an application if that certain BIOS version shows up, we also remove all : in the mac address, so we can use it as part of the computer name, the other part comes from the model(model alias). To make this work you also need the user exit script and that is included in the download. Note:This is just an example of what you can do and how the customsettings.ini file works.

Download:

http://sdrv.ms/XTctly

 

/Mike

3 Responses to “Back to Basic–CustomSettings.ini–Sample 2”

  1. Adam Stranger said

    question in regards to the MDT integration with SCCM 2012.
    should those entries be in both the rules of MDT and the CS for SCCM 2012 when you integrate? or just in the SCCM 2012? i like using SCCM / MDT, but never sure which should be where, and I do like to use use the MDT DB.

  2. […] The link to the AliasUserExit Script: http://deploymentbunny.com/2013/03/06/back-to-basiccustomsettings-inisample-2/ […]

  3. […] Back to Basic–CustomSettings.ini–Sample 2 […]

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

 
Follow

Get every new post delivered to your Inbox.

Join 4,036 other followers

%d bloggers like this: