tmiller_hockey Posted May 24, 2012 Report post Posted May 24, 2012 Hey guys, I work for a school district with 13 campuses. We have a naming scheme that we use which is as follows: CAMPUS-SERIALNUM-T or -S The T designating a teacher machine and the -S designating a student machine. I have scripts that will name them correctly. What would be the easiest way to accomplish getting these named correctly during a mass imaging? Separate TS's for each campus? Separate Packages on the back end? Looking for your ideas. Thanks, Todd Quote Share this post Link to post Share on other sites More sharing options...
tmiller_hockey Posted May 29, 2012 Report post Posted May 29, 2012 Anyone? Quote Share this post Link to post Share on other sites More sharing options...
jkabaseball Posted May 29, 2012 Report post Posted May 29, 2012 The serial number can be pulled from the BIOS. How do you plan on getting the campus and T/S? Without a way for SCCM to look up and figure out if serial number XXXX is a T or S and also what campus it is on, I think the best idea would be different task sequences. Then the task sequence just needs to figure out the serial number it can pull from the BIOS. The other option would be manually putting the PC Name in while you are selecting the task sequence. Then you can have one task sequence that will pull the PC name from the variable you typed in. Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted May 29, 2012 Report post Posted May 29, 2012 Depends on if you campuses have their own domain controller or at least subnets, and your T/S machines have at least one hardware part that makes em unique. If yes, you can easily script that or better let the customsettings.ini of MDT do the work for you. So in this case you could make it zero touch. If not, you can still create an HTA frontend with radio buttons for T/S and a pull down menu for the campus to make it a lite touch deployment. You should avoid to use different task sequences. The MDT gives you all the tools needed to create a dynamic single task sequence. Quote Share this post Link to post Share on other sites More sharing options...
tmiller_hockey Posted May 30, 2012 Report post Posted May 30, 2012 My script currently grabs the serial from the BIOS so that's covered. I too was thinking that would be an insane amount of TS's to create. I'm not all that familiar with MDT so I'll poke around with it but where would you put an HTA in the TS? After the partitioning like my current script is? Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted May 30, 2012 Report post Posted May 30, 2012 The HTA should be the second step in your TS right after the boot to PE step, and together with MDT the 4th step. There is an own section for HTA frontends in this forum where you can find a lot of stuff and examples. -Restart to Windows PE -Use Toolkit package -Gather -Call HTA Quote Share this post Link to post Share on other sites More sharing options...
tmiller_hockey Posted May 30, 2012 Report post Posted May 30, 2012 Thanks, I'll try to trudge my way through that. Quote Share this post Link to post Share on other sites More sharing options...
tmiller_hockey Posted May 31, 2012 Report post Posted May 31, 2012 What if I wanted to do this without MDT? I like the idea of the HTA using dropdown lists and Radio Button. I assume the VBScript in the HTA can populate OSDComputerName like my current script does. Quote Share this post Link to post Share on other sites More sharing options...
tmiller_hockey Posted May 31, 2012 Report post Posted May 31, 2012 I've got an HTA created but when trying to verify the value via the radio button, there is no value shown. Here is my code: <html> <title>Name Selector</title> <hta:application id="NameSelector" applicationname="NameSelector" singleinstance="yes" windowstate="normal" caption="yes" showintaskbar="yes" sysmenu="yes" scroll="no" /> <script language="vbscript"> ' Global Variables. Dim strCampus Dim strSerialNum Dim strAppend Dim strComputerName Dim strLclUser Dim strLclPW Dim strComputer Dim objWMIService Dim objComputer ' Set Variables SET env = CreateObject("Microsoft.SMS.TSEnvironment") ' Obtain Serial Number strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For Each objSMBIOS in colSMBIOS strSerialNum = objSMBIOS.SerialNumber Next strCampus = CampusSelector.Value strAppend = AppendSelector.Value ' Set Computer Name strComputerName = strCampus & "-" & strSerialNum & "-" & strAppend 'Set OSD Computer Name Variable env("OSDComputerName") = strComputerName </script> <body> <SELECT id="selOne" size="1" name="CampusSelector"> <option selected>Select Campus From List</option> <option value='CAMP1'>CAMP1</option> <option value='CAMP2'>CAMP2</option> </SELECT> <SELECT id="selTwo" size="1" name="AppendSelector"> <option selected>Select Teacher Or Student</option> <option value='T'>T</option> <option value='S'>S</option> <INPUT TYPE="radio" NAME="ComputerName" VALUE="strComputerName" onclick="Alert strComputerName">Display Name </body> </html> Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted May 31, 2012 Report post Posted May 31, 2012 Try this instead and keep in mind that computernames are limited to 15 charcters in a domain. Sou you will probaly have to optimize your naming conventions. <html> <title>Name Selector</title> <hta:application id="NameSelector" applicationname="NameSelector" singleinstance="yes" windowstate="normal" caption="yes" showintaskbar="yes" sysmenu="yes" scroll="no" /> <script language="vbscript"> ' Global Variables. Dim strCampus Dim strSerialNum Dim strAppend Dim strComputerName Dim strLclUser Dim strLclPW Dim strComputer Dim objWMIService Dim objComputer ' Set Variables SET env = CreateObject("Microsoft.SMS.TSEnvironment") ' Obtain Serial Number strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For Each objSMBIOS in colSMBIOS strSerialNum = objSMBIOS.SerialNumber Next strCampus = CampusSelector.Value strAppend = AppendSelector.Value ' Set Computer Name strComputerName = strCampus & "-" & strSerialNum & "-" & strAppend 'Set OSD Computer Name Variable env("OSDComputerName") = strComputerName function showCName() strComputerName = selOne.Value & "-" & strSerialNum & "-" & selTwo.Value msgbox strComputerName End Function </script> <body> <SELECT ID="selOne" size="1" name="CampusSelector"> <option selected>Select Campus From List</option> <option value='CAMP1'>CAMP1</option> <option value='CAMP2'>CAMP2</option> </SELECT> <SELECT ID="selTwo" size="1" name="AppendSelector"> <option selected>Select Teacher Or Student</option> <option value='T'>T</option> <option value='S'>S</option> </SELECT> <INPUT TYPE="button" NAME="ComputerName" VALUE="Display Name" onclick="showCName"/> </body> </html> Quote Share this post Link to post Share on other sites More sharing options...