Ask questions. Help others.
The HP Community is here for you.
Post new question
Note on archived topics.
This topic has been archived. Information and links in this thread may no longer be available or relevant.
If you have a question create a new topic by clicking here, or click on "Post new question" above and select the appropriate board.
Top Student
Posts: 5
Member Since: ‎12-10-2013
Message 1 of 1 (685 Views)

T610 Wes7 set Hostname to Asset Tag

We too have had the annoying bug where some devices will pick up the hostname of the TC used to create the master image during the imaging process.  Based on the thread and soloution posted by tanelorn26  we have created a script to set the host name from the asset tag set in the BIOS.


Edit the _File and Registry template, add a Scipt sub-task.  Start in "C:\Windows\xpeagent\" and Run as "System".  Paste the code below into the Content section.


for /f "tokens=*" %%i in ('wmic systemenclosure get SMBIOSassettag /value ^|findstr "="') do set asset=%%i
set asset=%asset:~15%
echo %asset%
Hpdmmc set network hostname=%asset%


  We now have a template sequecnce that updates the BIOS if needed, deploys an image than runs the task created above to set the hostname.


I hope you find this useful and thanks to tanelorn26 for pointing us in the right direction.

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation