You may not have the opportunity to install a new Forest in your company but it is good now how easy it has become to create new AD infrastructure from PowerShell without using Google or Bing.
The best thing about PowerShell is that is an exploratory language. What is means is that you can find everything you need from within the shell. The following commands should be your best friends
|get-help "command name"|
|get-member "command name | get-member"|
With those cmdlets you can really do a lot and the best friend of all is the wildcard “*” and I will show you why. Always type update-help on shell and make sure you have internet access because it updates the help files from the internet. You can also download the help files and import them from another machine
- In order to install a new Active directory Forest we need to find the role first.
|get-Windows Feature -name AD*|
As you can see by just typing that you get a lot of different roles and from here you can take a good guess what feature you needs to install to install a new ADDS
|get-WindowsFeature AD-Domain-Services | Install-WindowsFeature|
2. Now you can install the Windows feature. This would install the necessary modules an bits on the server but not promote the server to a domain controller
3. So need to reboot anything yet and the Active Directory module is available on the machine
4. Make sure to run update-help again
5. Now to find what commands you have available you can run the following
|Get-Command -Module ADDS*|
6. And it would be a easy guess the next command to run to install ADDS. You can run the following code to see how to use the command
|get-help Install-ADDSForest -Examples|
|Install-ADDSForest -DomainName 'company.local' -InstallDNS|
After you install everything the only GUI I have seen so far on server core will appear.
After reboot the new Forest should be already created.