05/17/2012 12731 views


Can anyone send me a batch script that would get Windows or KACE, whatever it might be, to prompt for a computer name before joining the domain? Our computer names can't be random and a prompt asking for it would be perfect. I've seen references to this being done on a WIM but they didn't provide thier script in the forum.


Answer Summary:
0 Comments   [ + ] Show comments


Community Chosen Answer


Try this:



This script will allow the name to be changed prior to joining the domain.  I am actually trying it right now, because our names cannot be random either.  We have to name them according to our inventory tags that are placed on them.

Answered 05/18/2012 by: dwilliams1307
Purple Belt

  • These pre/post install tasks look pretty nice - annoyed that I wasn't aware of them until now.

All Answers


In my sysprep file/unattend file I leeave the computer name blank. This prompts for a name during install/sysprep. I then use command line netdom join %computername% /Domain:awesome.org /UserD:domainadmin /PasswordD:password after the computer completes its thing. Thats just how I do things.

There are many other ways to do this with scripts and linked to kace script is one I'd recommned trying as well.



Answered 05/18/2012 by: Tentacle Master
Fourth Degree Black Belt

  • Hi, thanks for the response. Doing it this way, exactly when does it prompt for the computer name...at the end of the build? And to leave the computer name blank in the answer file do I go or *? Because I'd thought I'd used the asterisk before but never been prompted. Cheers.
  • Blank will prompt you, * will generate random. We use http://downloads.kace.com/support/downloads/k2000/scripts/Get-Set_Computer_Name.zip as well. This prompts at the beginning of the image, and sets it mid-level.
    • The Get-Set_Computer_Name.zip is awesome! Does exactly what I need and tested working. Brilliant. Thanks for your help.
  • Thank you for you comment! Kent and I worked hard on this, and tried to make options that customers requested. The amazing this is how many people do know about it. It was just something he and I developed because the method was lacking for scripted installs, and we got carried away from there ;)

    Lead L3 Enterprise Solutions Engineer, K2000
    If my response was helpful, please rate it!
    • Hello In x64 images the names does not seem to be applied? Why is this when I use these commands with the K2000