Avatar of Reyesrj
Reyesrj
Flag for Guam asked on

Script to change hostname

Hi All,

I would like to know if it’s possible and how to create a script to change a computer hostname.  Our techs will create a master image and copy the image to about 20 workstations.  If I had all the MAC addresses of all twenty workstations (I’ll get from DHCP) I want the script to assign a specific hostname to that workstation if it has that MAC address.  So the script will be imaged to all 20 workstations.  When imaging is completed all that will be needed is to run the script.

Thanks in advance
Scripting Languages

Avatar of undefined
Last Comment
Reyesrj

8/22/2022 - Mon
arnold

What OS are you dealing with?
Usually, if you have the mac and names, you can do the post install script using depending on your answer to the first question.
Reyesrj

ASKER
Windows 7 OS.  I also plan or having the script run on the first reboot.  Again if this is possible.

Thanks for the reply
ASKER CERTIFIED SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Reyesrj

ASKER
thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck