How to add computers to a Domain via Scripting
I personally prefer to use the solution provided by Berkeley found at http://calnetad.berkeley.edu/documentation/scripts/.
I went ahead and downloaded the joinDomain.cmd
script and made slight changes to it. I also got the latest netdom.exe from the
support tools from the Windows 2003 R2 CD. I might add the zip file in the future just in
case they take it offline, but I think this is a good resource nevertheless.