Here is what I do (to give you an idea) with my customsetting.ini file. I've left out the [Default] section. I have an entry for each piece of hardware we support. I've just added an example laptop, desktop and VMWare platform for an example. I've also replaced
our site code with your London example.
Variable Model and SerialNumber are task sequence variables that are available to use. Thus they are not new values and are not on the Properties list.
[Settings]
Priority=Default,ByModel,DefaultGateway,SetMacSettings
Properties=SiteCode,tSerialNum,OUContainer,OUSite,PCPrefix
[SetMacSettings]
OSDComputerName=%PCPrefix%%SiteCode%%tSerialNum%
MachineObjectOU=LDAP://%OUContainer%,%OUSite%,DC=contoso,DC=com
[ByModel]
Subsection=%Model%
[Latitude E7440]
OSInstall=Y
PCPrefix=L
OUContainer=OU=Laptop,OU=Machines
tSerialNum=#Right("%SerialNumber%",7)#
[OptiPlex 9020]
OSInstall=Y
PCPrefix=D
OUContainer=OU=Desktop,OU=Machines
tSerialNum=#Right("%SerialNumber%",7)#
[VMWare Virtual Platform]
OSInstall=Y
PCPrefix=V
OUContainer=OU=Virtual,OU=Machines
tSerialNum=#Right(Replace(Replace(oEnvironment.Item("SerialNumber")," ",""),"-",""),7)#
[LONDON]
SiteCode=LON
OUSite=OU=London
TimeZoneName=GMT Standard Time
[DefaultGateway]
10.0.0.1=LONDON
So, with this example a Latitude E7440 laptop with serial number 1234567 on the 10.0.0.1 network would image as follows:
1. Process [Default] section (not included here)
2. Process [Bymodel] section
a. Model variable will equal Latitude E7440 and execute that subsection
b. OSInstall=Y (allows image to proceed)
c. PCPrefix=L (For Laptop)
d. OUContainer=OU=Laptop,OU=Machines (This starts to build the string that tells were to place the machine when it joins the domain)
d. tSerialNum=The several characters starting from the right of the machines serial number
3. Process [DefaultGateway] section
a. Match up to the 10.0.0.1 gateway and execute the [LONDON] section
4. Process [LONDON] section
a. SiteCode=LON (We use a sitecode for our systems as part of their name)
b. OUSite=OU=London (This would determine the location part of your OU string)
c. TimeZoneName=GMT Standard Time (Sets your timezone...)
5. Process [SetMacSettings] section (This is where I combine everything from before.)
a. OSDComputerName=LLON1234567
b. MachineObjectOU=LDAP://OU=Laptop,OU=Machines,OU=London,DC=contoso,DC=com (DC will differ for your environment)
i. If you did a desktop, it would have ended up as LDAP://OU=Desktop,OU=Machines,OU=London,DC=contoso,DC=com
I hope this example helps. Let me know if something isn't clear.
- Edited by
James Ihde
Friday, November 08, 2013 4:21 AM
clarification
- Marked as answer by
Peter Cashen
Friday, November 08, 2013 8:18 AM