Jump to content


tmiller_hockey

Opinions Needed On How To Setup Naming Of Machines

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
Share on other sites

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>

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.

Guest
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.

Loading...


×
×
  • 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.