SysPrep Phase III - Rename/JoinRename PC & Join Domain AutomaticallyUtilizing SysPrep has now eliminated the need to maintain multiple images on a regular basis. By reducing the number of maintained images, errors have also been drastically reduced as a result. In a day and age when we’re being asked to do more work with less available resources, finding a way to eliminate some of the monotonous, repetitive tasks is the next challenge. Two tasks that consume huge amounts of technical support staff’s time are configuring the NetBIOS of a PC and joining a domain, once the workstation has been re-imaged. There are several methods that can be used to accomplish these two very important tasks. This is what we use in our company for automating these two tasks.

Utilities, Scripts, and Registry filesThe following files are needed to configure a workstation to rename itself and join a domain without the need for any human intervention. These files are placed into C:\Temp on each base image.

Netdom.exeLocated at http://www.microsoft.comUtility to automate the process of joining a domain automatically. This is a Windows 2000 Support Tool, included on Windows 2000 Server CDNOTE: Be sure to use the version of netdom.exe compatible with your workstation operating system.

Shutgui.exeLocated at http://www.microsoft.comShutdown graphic interface command used to reboot workstation after each section of the automated process has been completed.

Explanations1) Compname /c C:\temp\netbios.txt ?i.?j.?k.?lChanges the computer name to the one specifiedSearches netbios.txt file for current IP address. Wildcard notation (?) for first, second, third, and fourth octet of the IP address

Explanations1) Netdom join /domain: /userd: /passwordd:%COMPUTERNAME%Environment variable for NetBIOS name/domain:Domain where PC should be added/userd:Domain account with rights to add PC to domain/passwordd:Password for the domain account being used.

3) del c:\temp\*.exe /f /q > nulDeletes files in C:\temp directory. This particular line deletes all filenames with a .exe extensionNOTE: Secondboot.cmd does not get deleted because it is currently in use.

CreditsAll SysPrep articles could not have been completed without the hard work of several State Street employees. Henry Duong hmduong@statestreetkc.com, responsible for working with SysPrep initially, ultimately enabled us to reduce the number of images we were maintaining on a regular basis. Without Darren Kirkland’s[email]dekirkland@statestreetkc.com [/email]expertise in coding batch files and spending countless hours testing, we would not be able to automate the process of renaming a PC and joining the domain. And finally, when Henry departed our Help Desk staff for bigger and better opportunities in the Network Services department, Craig Doolin cmdoolin@statestreetkc.com was instrumental in determining how to add brand new hardware into the SysPrep process. Craig and Darren are currently PC Support Specialists at State Street.