MDT 2010: Setting the default Computername

Most organisations have some sort of PC naming convention in place. Sometimes the human factor can mess it up. Fortunately, MDT can provide semi or full automation as required.

In the customsettings.ini type:

SkipComputerName=NO
OSDComputerName=PC_%SerialNumber%

In this example, the SkipComputerName is set to NO so a value can be set and  changed during LTI deployment using the wizard pane. Setting the value to YES will hide the computername wizard pane so the value set in OSDComputername will be forced.

The OSDComputername setting contains the name that the computer will be called during the deployment. You are able to use a combination of settings/values. The example above will build the pc (in my case) as PC_G183F7K.

You can use a mixture of variables and ASCII key combinations to construct your computername as your organisation dictates. More variable examples can be found in  the variables.dat file, but here are a few that could be useful in computer naming:

“ARCHITECTURE”=X86
“SERIALNUMBER”=G183F7K
“MAKE”=Dell Inc.
“MODEL”=Latitude D610
“PRODUCT”=0M7181
“ASSETTAG”=

About these ads

About Andrew Barnes

A Scipting and Deployment Specialist.
This entry was posted in MDT 2010 and tagged , , , , , , . Bookmark the permalink.

12 Responses to MDT 2010: Setting the default Computername

  1. Alton Henley says:

    How do I get MDT 2010 to ask what the asset tag is?

  2. Craig says:

    I’m trying to deploy to a mixed physical / VM environment using the serial number for the OSDComputername.
    However, on my VMs (VM Ware) the VM serial number is full of spaces. is there a way to stripe out the spaces on the fly?

    • Hi Craig, the answer is yes, there’s a number of ways to tackle this issue.
      Try this line in your customsettings.ini

      OSDComputerName=#Mid(Replace(Replace(oEnvironment.Item(“SerialNumber”),” “,”"),”-”,”"),7,15)#

      If it looks scary dont be. I’ve written an article for you explaining how I dealt with this issue. I’ll publish it in the morning.

  3. Naveed Anwar says:

    Hi Andrew!
    I found your post very helpful, thnaks for sharing!
    I have a scenario where I have NOT to use MDT /SCCM just standalone installation with Unattend.xml file … but at the same time I need to have PC name as Serial Number.
    OR in other words, I would like to achine the following without MDT /SCCM.
    OSDComputerName=PC_%SerialNumber%

  4. Itay says:

    Hi Andrew!,

    Nice blog! i have learned a lot from you.
    I have one question that I want to ask you, maybe you can assist.

    already I have MDT task with zero touch settings that is working and including joining my domain.

    I want to be able during the OSD to tell it who is the user (domain user) and that it will set the computer name same as the user that i will provide and also will add that user to the local admin group.

    Is this something that is possible?

    Thanks!

  5. Amy says:

    Junk! I know of no-one who uses serial number for comp name! EVERY org uses PC naming that relates to location, Room17,, PC17. LAB50, PC-50. etc.

    • Junk? Perhaps you need to get around more. I’ve been in IT for 20 years. I’ve seen asset tags, mac addresses, complex variations including locations, you name it.

      My current employer uses MAC addresses and has 450,000 clients worldwide.

      Anyway, you’re missing the point, the above is a working example that can be expanded upon.

      There is no way to automate a computername using a room number so I think the whole point of ‘Automation’ has gone right above your tiny head.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s