
Other links
Radia - General Discussions
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
Previous 8 comments



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.

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.

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.


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.

Here are more PowerShell methods for HP Radia Client Automation:
https://github.com/BrandonTylerStevens/PowerShell/tree/master/HP%20Radia%20Client%20Automation
HTML Reports
Get-RadiaServerDiskSpaceReport
Delete-PatchData
Fix-ZTime
Get-HPCAErrorCode
Get-RadiaServices
Open-ConnectPatchLog
Push-Patch
Push-Software
Participate
Ask, Discuss, Answer