Automate Renaming and Joining a domain using vbs

This script will do the following:

  1. Rename the computer
  2. Copy the script locally
  3. Set a task to execute the script in 2 mins
  4. Restart the computer
  5. When the script runs again (number3) it will see that the computer name matches the “domain” plus services tag serial and join it to the domain
  6. restart the computer
  7. delete itself from the local host

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}