-----Original Message-----
Hi
Netdom.exe should work, more here:
http://groups.google.com/groups?selm=402AFB1E.B2D2F6F4% 40hydro.com
To reboot the computer after the join, add /REBoot to
the command line of Netdom.exe.
I am not sure if (the latest) Netdom.exe supports remote
computers or not.
If not:
To run Netdom.exe remotely, take e.g. a look at PsExec.exe in
the free PsTools suite, found at
http://www.sysinternals.com
PsExec can even automatically copy a file (e.g. Netdom.exe) over
to the remote computer before it starts it.
Another freeware program with similar merits to PsExec is Beyondexec.
http://www.beyondlogic.org/consulting/remoteprocess/Beyon dExec.htm
Copying Netdom.exe to the remote computer (using e.g. the C$ admin
share) and then launch it using rcmd is maybe also an option.
If the computers are running Windows XP or newer, using
a WMI script is another option:
JoinDomainOrWorkgroup Method in Class Win32_ComputerSystem
us/wmisdk/wmi/joindomainorworkgroup_method_in_class_win32_
computersystem.asp
Here is a script from the TechNet Scripting Center that uses the
JoinDomainOrWorkgroup method:
Join Computer to a Domain
http://www.microsoft.com/technet/community/scriptcenter/c ompmgmt/scrcm31.mspx
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/d efault.mspx
.