NETDOM.exe (NT Resource Kit supplement 2, Win2K Support Tools)
Domain Manager - a whole bag of network management tools in one tool.
The syntax for NETDOM varies considerably between versions
In summary you can
/JOINDOMAIN /JOINWORKGROUP
/Add /DELETE a computer account
(including BDC and resource domain computer accounts)
/Query the secure channel of a resource domain or BDC
/List the resource domain/BDCs in a domain
/Edit trust relationships
/Query the computer role of any domain member or BDC.
In Win2K only
Move a workstation or member server (computer) to a new domain
Rename/Reset a workstation or member server
Verify or reset and synchronize TIME within a domain
Resynchronize 'out of synch' domain controller`s
Run NETDOM /? for full syntax - or look in the supplied WinHelp file.