Community
 
 
 

Radia - General Discussions

1323 followers
 
Avatar
Shaun Dawkins

Prompt for pc name at beginning of OSM process

We feel it would be beneficial in our environment to allow our desktop technicians the ability to type in a machine name before the OSM image process starts. Most of the time they start imaging new machines using USB flash drives that connect back to the OSM server. Right now it pulls the serial number automatically. We have a lot of things that happen after the image process takes place and it would work much better for us if our techs had an option to fully name the workstations before it all begins.  Has anyone else been able to accomplish this in their environment? Maybe this ability already exists and we just don't know about it..?

Thank you

8 comments
0

Please sign in to leave a comment.

 
 

Previous 8 comments

Avatar
Jamshed Qureshi

Hi Shaun,
Have a look at osmkit, from the command line you can set various attributes of the roms object. Our techs calls this utility from our custom web frontend.

Comment actions Permalink
Avatar
Nigel Ryan

There is an exit point which will run a script called Getmachinename. tcl if it exists. You can use this script to look up the serial number from a file or database

Comment actions Permalink
Avatar
Alex Taylor

In our envrinment we enter the hostname in the Asset Tracking Number BIOS field, and Radia via a TCL script automtically picks up this value and names the PC during the OS build.

This way we can add the hostname to Active Directory in advance, in the correct OU, and the entire build process completes with no user intervention.

Comment actions Permalink
Avatar
Prasad Balasubramanian

Hi Shaun,

We’ve two options to achieve the automation of naming the machines during OS deployment:

  • The first one is what is precisely pointed out by Nigel - Using Getmachinename.tcl exit point, one can write custom logic to map device serial numbers or other attributes to “compname”. 
  • OSMKIT toolkit : Using OSMKIT toolkit, attributes in LDAP can be updated for each device, so that during the actual deployment, this “compname” attribute will be utilized by OSM to configure the host name. 

Hope this helps.

Comment actions Permalink
Avatar
Shaun Dawkins

Thank you all for your replies.  We looked into the getmachinename.tcl before but maybe we were missing something in our understanding of it.  We'll have to reinvestigate it.  We have never looked into OSMKit but hopefully that provides us with the answers we were looking for.   On a side note, we also don't want to maintain some other database that stores the names that these scripts have to call. 

Alex - It sounds like our situations are similar. A part of all this is for us to eliminate any user intervention, also. For the most part we can do it now if the techs name the objects in AD first. (Serial number only)  As easy as that may sound they don't all do it. Our hope is that they can name the pc when they start the OSM process. (A name longer than just the BIOS serial number) 

We will revisit the getmachinename.tcl and look into the OSMKit and hopefully that will get us where we need to go.  Appreciate the assistance from all of you.

Comment actions Permalink
Avatar
James Thompson

The computer name that getmachinename.tcl generates is only used when a device is initially created in the repository.  

If the device already exists, the getmachinename.tcl calculated name will be ignored.  An OSMKit based approach is probably the more flexible way to go.

Comment actions Permalink
Avatar
Tim Houglum

Hi Shaun,

This could be accomplished by building a custom PowerShell script that is called at the beginning of the process to prompt for a computer name (error handling longer than 15 chars and special chars not allowed) .  The output then stored in a file, and using the PreInstall.cmd exit point (PreReboot.cmd will most likely also work), call a PowerShell script to read the file saved previously, and then parse the C:\osmgr.hlp\unattend\unattend.xml to replace the <computername>xyz</Computername> using regex commands.

Without a timeout, this process would halt OSM until user input is done, so keep that in mind if completely unattended installs are required.

Comment actions Permalink
Avatar
Brandon Stevens

Top Contributors