Download script from SkyDrive
To use the script, simply run it from a SCCM Task Sequence (Run Command Line f.ex) with the following string:
Cscript "pathtoscript"\NewComputerName.vbs /N:%VariableName%
If you wish to query the user for input, I suggest using OSD++, if you run OSD++ with the following XML,
the user can input a computer name and the input is stored in a SCCM Task Sequence called NewComputerName.
To use this input with the script, run the script with this string:
Cscript "pathtoscript"\NewComputerName.vbs /N:%NewComputerName%
You can actually set the OSDComputerName Variable right in OSD++,
the reason I'm not doing so will become clear in a later post that is under construction.