Recreating a real world scenario….virtually (Part Two)

Alejandro Reyes
Tech Jobs Academy
Published in
6 min readSep 9, 2016

Author’s Note: This post will be part two of a series in which I will be creating an infrastructure for a company called Contoso. It will consist of four virtual machines connected to an isolated network. We will have Active Directory and Federation Services along with a Windows 8.1 as a client on our virtual infrastructure. Some background in Hyper-V and servers will be useful to fully understand. Some prior knowledge in PowerShell will come in handy for parts one and two since all the setup will be done through it.

Part One: Setting up our environments.

We will first install Windows Server 2012 R2 and Windows 8.1 on our machines.

The first steps will consist of installing our operating systems to our virtual machines. In this environment we will use Windows Server 2012 R2 for both ContosoAD2 and ContosoFS2. Lastly we will use Windows 8.1 for our client machine. The screenshot below will be the same for both of our Server 2012 installations.

Here we just selected our desired language and keyboard input method
Next we just clicked INSTALL NOW.
Select Windows Server 2012 R2 Standard Evaluation Server with GUI
Accept the LICENSE TERMS and click NEXT
Select CUSTOM to make sure you select the correct partition. (or you can go ahead and select Upgrade).

On the following steps you will input your password for the ADMINISTRATOR account and click continue. Once this is done and you log in, you will now have Windows Server 2012 R2 up and running on your two virtual machines.

These steps will be very similar to installing Windows 8.1, with the exception to the screenshots below.

Input your desired PC Name
Select a Username and Password; click finish and you will be done.

Once our operating systems are all setup, the next step is to install Active Directory on ContosoAD2 Server.

The next step was change the name of our server and setup anything other information under Local Server. Afterwards we will install active directory onto ContosoAD2, with the domain of Contoso.com. Once this is done we proceeded to installing DNS.

Open Server Manager → select Local Server on the left hand side → click on the server name. This name was generated automatically and tends to be hard to distinguish/remember, so the first step is to rename our server to something distinguishable (ContosoAD2). Once you input the new server name you will need to restart.

Once it reboots you need to open Server Manager → click on Add roles and features. This will prompt the Add roles and Features Wizard. For Installation type select Role-based or feature-based installation and then click next. On server selection make sure to select the correct server from the server pool. Under Server Roles select Active Directory Domain Services.

Install ADDS and click Next.
On this pop-up make sure to select ADD FEATURES

On the Confirmation prompt select Restart the destination server automatically if required and click Install. Now all you need to do is wait a few minutes while the new role is installed on ContosoAD2 server.

The next step will consist of configuring a forest in our active directory, as soon as you open Server Manager you will notice a yellow notification next to a flag on the top right corner. Click on it and select promote to Domain Controller. Since we are creating a new forest, we will need to select Add A New Forest and insert out desired Root Domain Name. On Domain Controller Options have Windows Server 2012 R2 as both your forest functional level and your domain functional level. Also verify that both DNS Server & Global Catalog check boxes are selected. For Password you can enter your desired password and click Next five times until you are able to select Install. Once the installation completes and your VM restarts you will have completed setting up your forest for Contoso.com.

Adding a new forest

Connecting ContosoFS2 to our Contoso Domain and installing DHCP (Dynamic Host Configuration Protocol.)

Turn on ContosoFS2 and open Server Manager, on the right hand side select Local Server. The first thing to change is the name of the server to ContosoFS2 and this is done by selecting the blue hyper-link next to Computer Name. On the Computer Name/Domain changes window you will change the name of computer. Under Member of: select domain and type Contoso.com. After you click OK, you will need to restart the VM.

Setting up the computer name and Domain

Next step consisted of installing the DHCP role on ContosoFS2. This was done by opening Server Manager and doing Dashboard → Add Roles and Features. On the Add roles and features wizard click next on both Before you begin, Installation Type and Server Selection. For Server Roles select DHCP Server, on the pop-up select Add Features. Afterwards click Next two times followed by installing. After it completes installing you will need to click on the yellow notification to commit the DHCP.

installing DHCP

Configuring so that our Windows8_1Client2 can obtain an IP Address through our DHCP server.

This step is very simple, since all the computers are connected to the same network all you need to do is open a command prompt on our windows client machine. Once this was done all that is needed was to type IPconfig /release followed by a Ipconfig /renew.

The last step in part two of the series will consist of installing RSAT (Remote Server Administration Tool) onto our windows client.

First you will need to download RSAT from here. It is crucial to verify that you are downloading the correct version for the client VM. Once the download is complete you will need to need to move this .MSU file to our Scripts2 VHD that was created in part one of the series. This is simply done by mounting our Scripts2 VHD and moving our RSAT download to it, just make sure to eject the drive once you are done.

The next step is to attach the Scripts2 VHD to our Windows Client, but first you need to make sure that the client VM is turned off before proceeding. In order to attach the VHD to our client you need to open Server Manager → Right click the Windows 8.1 Client →Settings. On the setting window select IDE Controller 1 and select Hard Drive followed by clicking add.

Add a hard drive

On the following screen under Media select Virtual Hard Disk and click Browse. Here you need to point to the location of the Scripts2 VHD.

Once your VHD is attacked you can press OK to continue.

Turn on your virtual machine and go to File Explorer. Afterwards click on the hard drive (Scripts2) in order to have access to the RSAT download. Double click the .MSU file to begin the installation. If you get a security warning select Open. Afterwards select the license terms. The installation should not take very long, once it is complete you will have finished the setup portion.

Conclusion of Part Two

Part two of the series covered the final touches of setting up our environment. We did the operating system installation on all of our virtual machines and began creating our infrastructure. On ContosoAD2 we installed our Active Directory Domain Services and setup our domain controller. ContosoFS2 held our DHCP server and finally Remote Server Administration Tool was installed on our client machine. In Part Three we will begin to implement real world scenarios in which we will use our Contoso setup.

--

--