Showing posts with label vbs. Show all posts
Showing posts with label vbs. Show all posts

Monday, 19 April 2010

Script to alter Computername in a SCCM Task Sequence.

If you need to change the name of a computer based on a pre-configured variable, this should help you to accomplish the task.

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%

Side note:
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.
-Alex