Pages

Friday, July 25, 2008

How to join a Server/Computer to a Windows Domain from Command Line

You can join a Computer or a Member server from the command line usinf the the “netdom” command. This I should say is simpler than the right-click my computer thing. Just one single command will do…

The following procedure should work in Windows Server-2008, Windows Server 2003, Windows Vista, Windows XP. Although, you need the Administrator pack/Support Tools to be installed to get the netdom utility in Windows Server 2003 and Windows XP.

To download the support tools for Windows XP SP2, click here

To download the Administrator pack for Windows Server 2003, click here

1. Click Start - Run (in Windows Server 2008/Vista, Start-Search and type “Run”)

2. From the command prompt type

C:\Users\administrator> netdom join client1 /domain:hq.wr.com /userd:administrator /passwordd:******

Syntax is

netdom join /domain:<DomainName> /userd: /passwordd:*****

Where:
ComputerName is the name of the server that is running the Server Core installation.
DomainName is the name of the domain to join.
UserName is a domain user account with permission to join the domain.
NOTE: Ensure you have the primary DNS server set to your Domain Controller

3. When prompted to enter the password, type the password for the domain user account specified by UserName.

4. Restart the computer for the changes to take effect.

C:\Users\administrator> shutdown /r /t 0

No comments: