How to add windows 2008 server to domain with command line

Adding windows 2008 server to domain can be done with command line as follow: 

1. Open command line (Start < Run < type 'cmd' < press 'run'.

 

2. In the command line type the following command :

Netdom join <ServerName> /domain:<DomainName> /userd:<DomainName>\<UserName> /password:<Adminpassword>

Replace <ServerName> with DNS name of local server.

Replace <DomainName> with the domain name which you want to add the server to.

REplace <UserName> with administrator user that has privillidge to join server to domain.

Replace <Adminpassword> with the password for administrator user.

 

3. Reset the server.