VBScript – Automate Joining domain and changing name

This script will do the following:

  1. Rename the computer
  2. Checks to see if name matchs what you want it to be “domain-” plus the computer services tag
  3. Set a task to execute the script again in 2 mins
  4. Restart the computer
  5. When the script runs again (number3) it then joins the domain 
  6. delete itself from the local host
  7. restart the computer

 This script works with windows XP – it can be modified to work with other versions of windows link 2000 and 7. 

 {code lang:vb id:13}{/code}

 

This script should be placed in the root of the c: drive.  The great thing is that it delete’s itself when it is finished. I use it by adding it to my sysperep file.  Using it to run this task after it has done its tasks..  

 

Let me know how it works for you. 

 

Thanks