Naming machines via Deployment
Hi, Apologies if this has been asked in another post. I am looking for a simple guide or explanation as to how we can name machines during OS deployment. Would this simply involve a using a TS and csv file that lists MAC address and intended name for each machine or am i missing something? Thanks Alistair
August 24th, 2012 12:16pm

Ally Russell, Are you looking at doing automated naming? Do you want the computers named specific to the hardware? Do you want to manually name the computers? We created a Software Package with a VBS script in it.We have a step in our Task Sequence that is a "Run Command Line" named SCCM Prompt Name. If the script doesn't have any input in 450 seconds (7.5 Minutes), it will Auto Nname the computer.We then link the Run Command Line to the Software Package Containing the VBSIn the Command Line, we type SCCM_Prompt_Name.vbs Our systems get a computer name or it's auto generated. ------------------------------------------ On error resume next Dim sNewComputerName, oTaskSequence, sTSMachineName Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") ' Get the name the computer is set to receive and truncate to first 7 letters 'sTSMachineName = Ucase(oTaskSequence("_SMSTSMachineName")) 'use to get current name sTSMachineName = Ucase(oTaskSequence("OSDComputerName")) 'use to get OSD generated name 'If left(sTSMachineName,7) = "Put_Your_Win7_Prefix_Here-" Then ' bPromptName = True 'ElseIf sTSMachineName = "Put_Your_Prefix_Here" Then ' bPromptName = True 'Else ' bPromptName = False 'End If ' Note: The wscript.echo commands are logged in SMSTS.log for troubleshooting. They are not displayed to the end user. 'If bPromptName = True Then ' wscript.echo "Detected that the computer name is scheduled to receive a random value. Prompting user to input a standard name." sNewComputerName = InputBox ("Enter Computer Name", "Computer Name",sTSMachineName,,450) oTaskSequence("OSDComputerName") = UCase(sNewComputerName) wscript.echo "Set Task Sequence variable OSDComputerName to: " & sNewComputerName 'Else ' wscript.echo "Computer set to receive a standard name, continuing as is." 'End If ------------------------------------- Please feel free to let me know if this doesn't solve your issue. Happy Packaging -Brenton
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 2:01pm

Hi Brenton, Interesting way to do this. Just out of interest, if you do not respond to the name prompt, what does it generate the random computer name from? I will probably be looking to use a naming convention such as glw01, glw02, glw03 etc and will be imaging quite a few machines at a time so would like this all to be automated if possible. Thanks
August 24th, 2012 3:57pm

Here is a HTA for prompt system name: http://systemcenter4all.wordpress.com/2011/11/24/osd-prompt-system-name/ The article on russian language, but you can retranslate it with translate.google.com or use something else. If you want to use it, you need to integrate HTA support in your boot.wim. This is an excluded part of MDT HTA. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <!-- ' // *************************************************************************** ' // ' // Prompt System Name HTA OSD Task Sequence for Unknown Computers ' // ' // *************************************************************************** --> <title>Please type computer name here</title> <HTA:APPLICATION ID="oHTA" SCROLL="no" SELECTION="no" INNERBORDER="no" BORDER="normal" SINGLEINSTANCE="no" SYSMENU="yes" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="no" RESIZEABLE="no" /> <style type="text/css"> H1 {font-size: 14pt; color: #1370AB;} .Maintext {font-size: 10pt; color: #333333;} .ErrMsg {color: red;background-color: #ffff80; display: none;} .Larger {font-size: 12pt;} </style> <script language="vbscript"> Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") sTSMachineName = ucase(oTaskSequence("_SMSTSMachineName")) If left(sTSMachineName,6) <> "MININT" then if sTSMachineName <> "MINWINPC" then window.Close end if intwinhsize = 380 intwinlsize = 420 intHorizontal = 800 intVertical = 600 intLeft = (intHorizontal - intwinlsize) / 2 intTop = (intVertical - intwinhsize) / 2 window.resizeTo intwinlsize,intwinhsize window.moveTo intLeft, intTop Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI") ProgressUI.CloseProgressDialog Function ValidateComputerName If Len(ComputerName.value) > 15 then InvalidChar.style.display = "none" TooLong.style.display = "inline" NoName.style.display = "none" ValidateComputerName = false ButtonNext.disabled = true ElseIf Len(ComputerName.value) = 0 then InvalidChar.style.display = "none" TooLong.style.display = "none" NoName.style.display = "inline" ValidateComputerName = false ButtonNext.disabled = true ElseIf IsValidComputerName (ComputerName.Value) then ValidateComputerName = TRUE InvalidChar.style.display = "none" NoName.style.display = "none" TooLong.style.display = "none" ButtonNext.disabled = false Else InvalidChar.style.display = "inline" TooLong.style.display = "none" ValidateComputerName = false NoName.style.display = "none" ButtonNext.disabled = true End If End function Function IsValidComputerName (ComputerName) Dim regEx Set regEx = New RegExp regEx.Pattern = "[^a-zA-Z0-9\-\_]" IsValidComputerName = not regEx.Test (ComputerName) and len(ComputerName) <= 15 End function sub ButtonFinishClick if buttonNext.Disabled then exit sub else oTaskSequence("OSDComputerName") = UCase(document.all.ComputerName.value) Window.Close end if end sub sub ButtonCancelClick If Msgbox("Are you sure you want to cancel?",4,"Cancel wizard?") = vbYES Then window.Close end If end sub sub onload document.all.ComputerName.value = sTSMachineName document.all.ComputerName.focus document.all.ComputerName.select end sub sub KeyHandler if window.event.KeyCode = 27 then ButtonCancelClick elseif window.event.KeyCode = 13 then ButtonFinishClick end if end sub </script> </head> <body onload=onload onkeydown="KeyHandler"> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> <tr> <td> <H1>Configure the computer name</H1> <span> <p>Choose a name for your PC that will help you identify it on your network, if you have one. Each computer on your network must have a unique name.</p> <P>You can name your computer based on its owner or location, for example "DAVID" or "XYZLAB123." In order for your computer to appear on a network, its name cannot be longer than 15 characters or contain any spaces or characters aside from the numbers 0-9, the letters A-Z and a-z, and hyphens.</P> <p><span>Computer n<u>a</u>me:</span> <input type=text id=ComputerName name=ComputerName size=15 language=vbscript onpropertychange=ValidateComputerName AccessKey=A /></p> <p>&nbsp; <label id=NoName>* Required (MISSING)</label> <label id=InvalidChar>Letters, Numbers & Dashes only!</label> <label id=TooLong>Maximum of 15 characters!</label> </p> </td> </tr> <tr> <td class="CommandArea" id="RightWizardButtons" align="right"> <button accesskey=N id=buttonNext onclick=ButtonFinishClick language=vbscript>Fi<U>n</U>ish</button> <button accesskey=C id=buttonCancel onclick=ButtonCancelClick language=vbscript><U>C</U>ancel</button> </td> </tr> </table> </body> </html>
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2012 5:56am

Normally the name in database must be used during OSD for computername. Just have a look at my blogs also for more information: Before OS deployment: http://henkhoogendoorn.blogspot.com/2011/10/how-to-assign-computername-before-os.html During OS deployment: http://henkhoogendoorn.blogspot.com/2011/03/how-to-assign-dynamic-computername.html Or you can import the devices with ConfigMgr manually or by CSV file also.My blogs: Henk's blog and Virtuall | Follow Me on: Twitter | View My Profile on: LinkedIn
August 27th, 2012 2:42pm

Normally the name in database must be used during OSD for computername. Just have a look at my blogs also for more information: Before OS deployment: http://henkhoogendoorn.blogspot.com/2011/10/how-to-assign-computername-before-os.html During OS deployment: http://henkhoogendoorn.blogspot.com/2011/03/how-to-assign-dynamic-computername.html Or you can import the devices with ConfigMgr manually or by CSV file also.My blogs: Henk's blog and Virtuall | Follow Me on: Twitter | View My Profile on: LinkedIn
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2012 2:44pm

Hey , I have been working in enviroment where we had to come up with automatic naming system. Initial inspiration was Mike Koster's WebServices however for specifics of big AD enviroment we had to come up with our own solution. If anyone would like to give it a test its available at http://itxsolutions.codeplex.com/ (this is initial release so any feedback would allow to build more advanced one) If that will not work for you check out Mike's blog / codeplex solution Blog at http://www.rpieniaz.wordpress.com
September 4th, 2012 5:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics