KB ID 0001400
Problem
I needed to spin up some Windows 2016 Servers, and a domain to do some testing. I have promoted hundreds maybe thousands of domain controllers, so I wondered if this time I could do it with PowerShell. It’s actually easier than using the GUI!
Solution
If you were doing this in Server Manager, you would have to add the role first, and PowerShell is no different;
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Then promote the server to a new DC in a new forest;
Install-ADDSForest
Supply the new domain name and the recovery password. Select ‘Y’ to reboot, go and have a coffee, when finished you will have a new DC in a new domain, ready to log into.
Related Articles, References, Credits, or External Links
NA
13/02/2018
Thanks!
will this powershell “version” of the process will also install the DNS role and everything else that is done with the gui “version” of the procerss?
13/02/2018
Yes of course, you can add some extra flags to change things but with the command you will get all the ‘defaults’ 🙂
Pete
13/02/2018
Thank you!