I was thinking the other day of how to better automate our computer imaging process so that input from administrators...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
could be further reduced. One area that usually requires input during the Sysprep process is the configuration of the computer name, TCP/IP settings and domain membership. I thought it would be great if I could store all this information in a network database that would be queried during the Sysprep process.
The Plan: Storing the configuration data
- Create an Access database, which contains information listed in the field design shown below.
- Populate the database with current configuration data for existing systems.
- Add configuration data for new systems as they arrive.
The Access database has the following fields:
To avoid possible duplicate entries, I set the SerialNumber field Indexed attribute to Yes (No Duplicates)
- Prior to running Sysprep, the master system is configured to use DHCP.
- The Sysprep.inf answer file will be configured to automatically generate a random name for the computer.
- The script referenced in this article will be run at the end of the Sysprep process via the cmdlines.txt file or the GUIRunOnce entry in the Sysprep.inf file.
- When the script runs, it will use the local systems serial number in a query on the database, which contains the configuration data.
- Once the configuration data is retrieved, the script will rename the computer, set TCP/IP settings, join a domain and then initiate a system reboot.
- When a system is re-imaged, no input is required from the technician during the Sysprep process.
- The system will automatically configure itself using the configuration data retrieved from the database and initiate a reboot.
- Certain procedures in the VBS script code are Windows XP specific. For samples on how to accomplish similar tasks on Windows 2000, see Janis Keim's article, SysPrep Phase III -- Rename PC & join domains automatically.
- The VBS script code, database template and a sample log file can be downloaded here --> 9385ConfigMe.zip.
- I have tested this process using a Windows XP client and Windows Server 2003 on a small test network and feel pretty comfortable. However, I suggest fully evaluating the process prior to using it on production systems.
- As detailed in a recent Scripting Guys Webcast, scripters can also use Excel and text files to store and retrieve data. For more information on using other file formats, visit the Microsoft TechNet Script Center or the Scripting Guys Webcasts Web site for sample code.
- This code can be further expanded to include items such as local and network printer connections.
- If there are any questions on the content of this article, please post to the Article Discussions forum or the VB Script forum. This will allow others to also benefit from the discussion.
BIO: Dan Thomson was first introduced to computers 15 years ago when he became a machinist in 1988. Dan graduated to a PC and gradually worked his way through learning various CAD and CAD/CAM programs. He eventually earned his MCSE 4.0 and A+ certifications and is currently studying for a Bachelors Degree in Computer Science.
Windows XP: Automating deployment using Sysprep – by Dan Thomson
SysPrep – by Janis Keim
SysPrep Phase II -- Adding New Hardware – by Janis Keim
SysPrep Phase III -- Rename PC & join domains automatically – by Janis Keim
Developing the perfect clone image – by Sean Cottrell
Auto-Run SysPrep – by Rod Trent
This article first appeared in myITforum, the premier online destination for IT professionals responsible for managing their corporations' Microsoft Windows systems. The centerpiece of myITforum.com is a collection of member forums where IT professionals actively exchange technical tips, share their expertise, and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS). It is part of the TechTarget network of Web sites. To register for the site and sign up for the myITforum daily newsletter, click here.