Jump to content


How can I easily prompt for a computer name in Configuration Manager 2012

Recommended Posts

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.


enable unknown computer support.png


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.


all unknown computers properties.png


select the Collection Variables tab and click on the Yellow star burst button as shown below


collection variables.png


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


new variable.png


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.


deployed to all unknown computers.png



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.


computer pxe booting.png


select your task sequence and click next


select task sequence.png


now you will see a Task Sequence window called Edit Task Sequence Variables


edit task sequence variables.png


double click on OSDComputerName, the following should appear


OSDComputerName double click.png


type in a computername


computername entered.png


click ok and the computername value should be listed to the right of the variable name as shown below


value listed.png


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)


adding collection variable.png


that's it, I told you it was easy !




  • Like 3

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.