You can use the NetDom command-line utility to join a computer to an Active Directory domain. This is useful when scripting or just for system administrators who prefer the command-line to GUI.
After a fresh Windows Server 2008 Core installation, the computer is given a random hostname. One of the first steps to configuring the server is to rename the computer. To do this you must use the NetDom command-line utility and then reboot the server.