Answered by:
Automating Computer Naming and Active Directory OU location in SCCM OSD

Question
-
We're a company that has about 20 different locations throughout the world and currently have a company-wide naming convention that combines that locations' airport code with the S/N of the machine and machines get placed in a "Computers" OU in Active Directory that's based on their location. We're currently using MDT 2010 and are able to accomplish this using a unique customSettings.ini file at each location. We have SCCM 2007 SP2 and R2 and would like to migrate to that solution however we're unable to find a way in SCCM to automate the computer naming to be different at each site and the OU of the machine being imaged to be different at each site. Each location has its own secondary site server and we'd likely implement the PXE Service Point role at each site. What's the best way in SCCM OSD to try to accomplish a unique naming convention and AD Computer OU at each site?
Tuesday, February 9, 2010 4:56 AM
Answers
-
You may set the entry "OSDComputerName=SEA%SERIALNUMBER%" in customsetting.ini file.
(SEA = Seattle Airport Code)
Example:
[DefaultGateway]
192.168.0.1=COPENHAGEN
11.1.1.11=SEATTLE
172.28.20.1=SEATTLE[COPENHAGEN]
OSDComputerName=CHP%SERIALNUMBER%
MachineObjectOU=OU=CPH,OU=DomainComputers,DC=domain,DC=com
[SEATTLE]
OSDComputerName=SEA%SERIALNUMBER%
MachineObjectOU=OU=SEA,OU=DomainComputers,DC=domain,DC=com
BTW... This code/script in NOT tested. But with a little testing and modifying, you should be able to make it work...
Ronni Pedersen | MVP | MCTS:Configuration Manager 2007 | MCITP:Enterprise Administrator | MCT- Marked as answer by Eric Zhang CHN Friday, February 26, 2010 5:05 AM
Tuesday, February 9, 2010 5:40 PM
All replies
-
the Ad OU could be accomplished via a mix of Task Sequence variables and Collection Variables.
the task sequence variable for OU would be MachineObjectOU and could be specified in the collection variable as MachineObjectOU = "OU=Workstations, dc=contoso, dc=com"
then you replace the Domain OU: section from Join a Domain setting within the task sequence Apply Network Settings step
to read %MachineObjectOU %
by droppping computers into that collection they'll automagically get the correct OU when getting deployed, just an idea
as regards Computername, you can do something similar with the OSDComputerName variable, it's just up to you to get creative
good luck
cheers
niall
My step by step SCCM Guides
windows-noob on TwitterTuesday, February 9, 2010 8:23 AM -
Where it gets tricky is that we'd like to automate this for bare metal machines. I like the collection variable suggestion and I'm wondering how would I do that for unknown computers? Could I create multiple collection variables in the Unknown Computers collection for each site or do the variable names HAVE to be MachineObjectOU and OSDComputerName? This functionality is built into WDS. Could I somehow configure that in WDS on the PXE Service Points and use those settings in OSD?Tuesday, February 9, 2010 3:15 PM
-
You may set the entry "OSDComputerName=SEA%SERIALNUMBER%" in customsetting.ini file.
(SEA = Seattle Airport Code)
Example:
[DefaultGateway]
192.168.0.1=COPENHAGEN
11.1.1.11=SEATTLE
172.28.20.1=SEATTLE[COPENHAGEN]
OSDComputerName=CHP%SERIALNUMBER%
MachineObjectOU=OU=CPH,OU=DomainComputers,DC=domain,DC=com
[SEATTLE]
OSDComputerName=SEA%SERIALNUMBER%
MachineObjectOU=OU=SEA,OU=DomainComputers,DC=domain,DC=com
BTW... This code/script in NOT tested. But with a little testing and modifying, you should be able to make it work...
Ronni Pedersen | MVP | MCTS:Configuration Manager 2007 | MCITP:Enterprise Administrator | MCT- Marked as answer by Eric Zhang CHN Friday, February 26, 2010 5:05 AM
Tuesday, February 9, 2010 5:40 PM -
Did you solve this problem ?
Ronni Pedersen | MVP | MCTS:Configuration Manager 2007 | MCITP:Enterprise Administrator | MCTSunday, February 14, 2010 2:16 PM -
How can I differentiate between Laptop and Desktop? I have tried using IsLaptop and IsDesktop in the cs.ini, but it doesn't work like it did in the old BDD 2.5.
I have one subnet in Ohio where I need to name desktops OHW#Right("%SerialNumber%",8)# and laptops OHL#Right("%SerialNumber%",8)#. all other subnets are W#Right("%SerialNumber%",8)# for desktops and L#Right("%SerialNumber%",8)# for laptops.
Tried using the DefaultGateway TS variable in a Task Sequence step but it doesn't seem to work. Only IsDesktop and IsLaptop work in the TS. Thanks,
Ray
Wednesday, June 2, 2010 9:04 PM -
Try some thing like this out:
[Settings]
Priority=Laptops,Desktops,DefaultGateway,Default
Properties=LocationPrefix,PlatformDesignator[Default]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES
OSDComputerName=%LOCATIONPREFIX%%PLATFORMDESIGNATOR%#Right("%SerialNumber%",8)#
; -------------- Platform/Model specific Settings -------------[Laptops]
Subsection=Laptop-%IsLaptop%[Desktops]
Subsection=Desktop-%IsDesktop%[Laptop-True]
PlatformDesignator=L[Desktop-True]
PlatformDesignator=D; -------------- Location specific Settings -------------
[Location-USA]LocationPrefix=USA
MachineObjectOU=OU=Computers,OU=USA,OU=KS,,DC=domain,DC=com[Location-<LocationName>]
LocationPrefix=XXXMachineObjectOU=OU=Computers,OU=XXX,OU=KS,,DC=domain,DC=com
-------------- Gateway/Location Mappings -------------
[DefaultGateway]
10.100.157.1=Location-USA
10.100.129.1=Location-<LocationName>Thanks,
Jason
- Proposed as answer by Jason C. DyeMicrosoft employee Wednesday, July 28, 2010 10:28 PM
Wednesday, July 28, 2010 10:28 PM