cancel
Showing results for 
Search instead for 
Did you mean: 
  • ×
    Information
    Know the Benefits of your HP account

    Connect with HP support faster, manage all your devices in one place, view warranty information and more– Click Here

    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
  • ×
    Information
    Know the Benefits of your HP account

    Connect with HP support faster, manage all your devices in one place, view warranty information and more– Click Here

    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
ArchivedThis 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 and select the appropriate board.
Highlighted
Just joined
5 4 0 2
Message 1 of 1
745
Flag Post

T610 Wes7 set Hostname to Asset Tag

HP Recommended

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.

ArchivedThis 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 and select the appropriate board.
† 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