How to Install a basic new AD Forest using PowerShell

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

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

  1. In order to install a new Active directory Forest we need to find the role first.

windowsfeature.JPG

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

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

help

5. Now to find  what commands you have available you can run the following

DomainHelp

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


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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s