Installing a Domain Controller (DC) using the command line can be a complex process, but it is an important step in building a Windows Server environment. The following tutorial will provide you with a step-by-step guide on how to install a Domain Controller with Command-Line.
Before you begin the installation process, make sure that you have a Windows Server installation disk, and that the disk has been inserted into the server.
Step 1: Open Command Prompt as an Administrator
To begin, open the Command Prompt as an Administrator. To do this, right-click on the Command Prompt icon and select “Run as Administrator.”
Step 2: Install Active Directory Domain Services (AD DS)
The first step in installing a Domain Controller is to install the Active Directory Domain Services (AD DS) role. To do this, type the following command into the Command Prompt:
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
This command installs the AD DS role and also includes the management tools.
Step 3: Promote the Server to a Domain Controller
After installing the AD DS role, the next step is to promote the server to a Domain Controller. To do this, type the following command into the Command Prompt:
dcpromo.exe
This will start the Active Directory Domain Services Installation Wizard.
Step 4: Choose Deployment Configuration
In the Active Directory Domain Services Installation Wizard, select “Create a new domain in a new forest” and click “Next.”
Step 5: Specify Forest Root Domain Name
In the “Specify Domain Name and DNS Server Settings” screen, enter the root domain name for your forest, and click “Next.”
Step 6: Set Domain and Forest Functional Levels
In the “Set Forest and Domain Functional Levels” screen, select the appropriate functional levels for your domain and forest. Click “Next.”
Step 7: Configure Additional Domain Controller Options
In the “Additional Domain Controller Options” screen, you can choose to install DNS, Global Catalog, and other options. Select the options that are appropriate for your environment, and click “Next.”
Step 8: Set Directory Services Restore Mode Administrator Password
In the “Specify the Directory Services Restore Mode Administrator Password” screen, set a password for the directory services to restore mode administrator, and click “Next.”
Step 9: Review Options and Confirm Installation
In the “Review Options” screen, review the options you have selected. If everything looks correct, click “Next” to begin the installation.
Step 10: Reboot the Server
After the installation is complete, the server will need to be rebooted. Type the following command into the Command Prompt to initiate the reboot:
shutdown -r -t 0
After the server has rebooted, the installation of the Domain Controller is complete.
Congratulations! You have successfully installed a Domain Controller with Command-Line.