How to use a collection variable to prompt for a computer name during an OS Deployment Task Sequence in System Center Configuration Manager 2007

hotfix This information is actually part of a KB article that recently got the OK for publishing but since it might take a day or so to show up I thought I'd throw the meat of it out here.

Note that when it does go live you should be able to find the complete article here as KB2026268.



It is a common request to have a way to be prompted during an Operating System Deployment Task Sequence to enter a computer name for the client that you are installing. There are scripts to do this and some are included with the Microsoft Deployment Toolkit, and there are others have been custom created.  Although these do work, there is a simpler method to implement this and it is built into the Configuration Manager 2007 Collection Settings.


In Configuration Manager 2007, if you right click on a collection, and select Modify Collection Settings, there is a TAB there, named Collection Variables.

This TAB allows you to add variables to the collection.  In this example we will add a variable named OSDCOMPUTERNAME, with a NULL value.  To do this follow the steps below: 

1. In the ConfigMgr 2007 Admin console, navigate to the Collections node under Computer Management, and right-click the Collection you are using to deploy your Task Sequence, and selct Modify Collection Settings on the shortcut menu.

2. Click to select the Collection Variables Tab.

4. Click the New button (looks like a gold asterisk).

5. Type OSDCOMPUTERNAME for the new variable Name, and uncheck the Do not display this value in the ConfigMgr Console check box.

6. Do not type anything for the Value or Confirm value fields, and then click OK, then click OK again.

That is it, now you have a new collection variable, and any Task Sequences you advertise to this collection, will prompt for this at the beginning of the Task Sequence before running. Right after selecting the Task Sequence to run and clicking Next, you will see the Variable dialog box, with any of the defined variables you added to the collection. Double click the variable named OSDCOMPUTERNAME, and type in the computer name as desired and then click Next, and it will run the Task Sequence as usual, and the newly imaged machine will be named according to what you typed in for this variable.

NOTE: You can add this variable, and others to any collection you choose, including the All Unknown Computers Collection introduced in Configuration Manager 2007 R2. To see some of the other variables that can be specified here are some links related to these variables, as well as other Task Sequence variables:

Capture Windows Settings Task Sequence Action Variables:

Operating System Deployment Task Sequence Variables

Disclaimer: This worked in a preliminary lab environment using the All Unknown Computers Collection and the single variable OSDCOMPUTERNAME.  Your results may vary.  Please test this and/or the other variables documented above in your lab environment before deploying into production.


J.C. Hornbeck | System Center Knowledge Engineer

clip_image001 clip_image002

Bookmark and Share

Comments (2)
  1. sunarhadi says:

    I used it in all unknown computer collection but only works on non-mandatory task sequence advertisement. Also modifying existing advertisement to non-mandatory didn't work so I have to create new non mandatory advertisement.

  2. WormkillerBill says:

    I set all of this up but the computer name still came up as a MININT.

Comments are closed.

Skip to main content