How To Deploy Active Directory Domain Controller Using PowerShell Script

Continuing from Yesterday’s post on How To Deploy Active Directory Forest Using PowerShell today I’ll show you how to Deploy a new Domain Controller using a PowerShell without any Interaction with the GUI.

The entire process Is automated and all you need to do Is fill the details In the script below:

Install-ADDSDomainController -DomainName test.local -Confirm:$false -InstallDns -SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" -Force)

The script will Deploy a new Domain Controller, Install DNS server and set a recovery password.

To deploy the DC, First join the server to the domain, Install the AD DS module and run the script.

After you run the script It will replicate all details from the other DCs

Once done Server will restart

To verify the new DC details type:

get-addomaincontroller

Leave a Reply