When you install new computers it would be nice to be able to easily name the computer as part of the deployment, otherwise the new computer could end up with a name like MININT-XRGHJTF unless you import it into Configuration Manager first. You can script around this in your task sequence or use web services or HTA’s but the easiest method of all is to set a Collection variable called OSDComputerName. This method does not require any scripting all you need to do is to Enable Unknown Computer support in the Distribution Point PXE tab settings.
To prompt the end user to enter a computer name In Configuration Manager 2012 by using the OSDComputerName variable you first need to think about the computers you are aiming this at, and in this case the computers are unknown computers, that is, they are unknown to Configuration Manager.
Step 1. add the collection variable
Now that we know that they are unknown we need to select the Unknown Computers collection called All Unknown Computers. Right click and choose Properties.
select the Collection Variables tab and click on the Yellow star burst button as shown below
enter the following variable name when prompted OSDComputerName, remove the checkmark from Do Not Display this value in the Configuration Manager console as in the screenshot below
click ok and apply so that it looks like this
Step 2. Make sure you have Deployed a task sequence to the Unknown Computers collection
Verify that you have deployed your chosen task sequence to the Unknown Computers collection by selecting the task sequence and clicking on the Deployments tab. The deployments listed should include one for the All Unknown Computers collection as shown below. If not, then create a new deployment for the task sequence and choose the All Unknown Computers collection for that deployment.
Step 3. PXE boot a new computer
PXE boot a new computer. Press F12 when prompted
Note: make sure the computer is NOT present in Configuration Manager prior to this, either as a previous computername or as an UNKNOWN object, if it is, highlight it in All Systems and delete it.
select your task sequence and click next
now you will see a Task Sequence window called Edit Task Sequence Variables
double click on OSDComputerName, the following should appear
type in a computername
click ok and the computername value should be listed to the right of the variable name as shown below
click next and the task sequence completes as normal
Step 4. Verify that it worked
Now that the Task Sequence is complete you can logon to your computer, bring up the computer properties and note the computername is what you entered earlier.
the variable is set during the Apply Windows settings step of the task sequence and you can see the collection variable being added in the SMSTS.log file (found in C:\Windows\CCM\Logs)
that’s it, I told you it was easy !
cheers
niall
I am trying to clarify something.
I have SCCM 2012 and imported the Computernames and associated mack address into a collection I created called “imported laptops”. There about 200 units.
I wish to use the information from the file import to name the machines during OSD.
What task sequence to I add to have to have SCCM OSD use the name of the computer based on the mac address? (unit one= macxxx,unit two=macxxx)
Or is the default behavior of the collection when assigning a deployment task?
Am I correct in my understanding that if I imported the Computername and mac into a collection it will use this information or do I still need to add the “OSDcomputername” task step before Windows Settings?
I have been sailing the stormy internet looking for dry land on this so any insights would spare me from walking the plank. (so to speak) Many thanks
I do not wish to manually enter the names and wonder how this works.