Checkpoints
Creating the network infrastructure
/ 50
Creating the first domain controller
/ 25
Creating the second domain controller
/ 25
Deploying a Fault-Tolerant Microsoft Active Directory Environment
GSP118
This lab is part of a series aimed at helping you deploy a highly available Windows architecture on Google Cloud with Microsoft Active Directory (AD), SQL Server, and Internet Information Services (IIS). In this lab you set up a redundant pair of Windows Domain Controllers (DC) with AD using a new Virtual Private Cloud (VPC) network and multiple subnets.
You can also use this lab to learn to set up an AD configuration for use in other architectures. Replicating a remote AD environment to the new Google Cloud-based AD environment will not be covered, although this is possible with Cloud VPN and additional AD configuration.
Objectives
- Create a custom mode VPC network with two subnets spanning two zones.
- Create Windows Server virtual instances and enable AD Domain Services.
- Configure a new domain with Active Directory.
- Join the new Windows Server instances to the new domain.
- Configure firewall rules to allow traffic to the virtual machines.
- Test the configuration.
Architecture
Setup and requirements
Before you click the Start Lab button
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.
This hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
- Access to a standard internet browser (Chrome browser recommended).
- Time to complete the lab---remember, once you start, you cannot pause a lab.
How to start your lab and sign in to the Google Cloud console
-
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
- The Open Google Cloud console button
- Time remaining
- The temporary credentials that you must use for this lab
- Other information, if needed, to step through this lab
-
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
Note: If you see the Choose an account dialog, click Use Another Account. -
If necessary, copy the Username below and paste it into the Sign in dialog.
{{{user_0.username | "Username"}}} You can also find the Username in the Lab Details panel.
-
Click Next.
-
Copy the Password below and paste it into the Welcome dialog.
{{{user_0.password | "Password"}}} You can also find the Password in the Lab Details panel.
-
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges. -
Click through the subsequent pages:
- Accept the terms and conditions.
- Do not add recovery options or two-factor authentication (because this is a temporary account).
- Do not sign up for free trials.
After a few moments, the Google Cloud console opens in this tab.
Activate Cloud Shell
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
- Click Activate Cloud Shell
at the top of the Google Cloud console.
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud
is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
- (Optional) You can list the active account name with this command:
- Click Authorize.
Output:
- (Optional) You can list the project ID with this command:
Output:
gcloud
, in Google Cloud, refer to the gcloud CLI overview guide.
Task 1. Initializing common variables
You must define several variables that control where elements of the infrastructure are deployed.
- Run the following script to define the environment variables for your project:
- Run the following to set the region to
:
- Click Authorize when prompted.
Task 2. Creating the network infrastructure
After you've defined the infrastructure variables, create the network and subnets that AD will use.
- In Cloud Shell, run the following command to create the VPC network:
- The following warning can be ignored. You'll create firewall rules in later steps.
- Add two subnets to the VPC network:
- Create an internal firewall rule to allow traffic between subnets:
- Create a firewall rule to allow an RDP connection on port 3389 from any location:
Click Check my progress to verify the objective.
Task 3. Creating the first domain controller
Next you'll create a domain controller that has the following properties:
- Name:
ad-dc1
- IP Address:
10.1.0.100
- Create a Compute Engine instance of Windows Server 2016 to use as the first domain controller:
Click Check my progress to verify the objective.
- Wait approximately one minute, and then create a password for
ad-dc1
by running the following command. Save the ip-address, username and password returned in Cloud Shell and label it for Domain Controller 1, they will be used in later steps:
ERROR: (gcloud.compute.reset-windows-password) The instance may not be ready for use. This can occur if the instance was recently created or if the instance is not running Windows. Please wait a few minutes and try again.
If so, just retry the command.
Copy and paste with the RDP client
Once you are securely logged into your instance, you may find yourself copying and pasting commands from the lab manual.
To paste, hold the CTRL-V keys (if you are a Mac user, using CMND-V will not work.) If you are in a Powershell window, be sure that you have clicked into the window or else the paste shortcut won't work.
If you are pasting into putty, right click.
Task 4. RDP into your instance
Use RDP to connect to the domain controller instance with the credentials you created in the previous step.
-
From the Navigation menu, go to Compute Engine > VM Instances.
-
Click
ad-dc1
to open the VM instance Details page for the first AD machine. -
Click RDP to open an RDP session to this instance.
- Depending on the system you are using you may need to install a third party RDP client or install the Chrome RDP plug-in in order to connect.
- Connect using the ip-address, username and password you saved when you set the local windows user account password.
- If you download the RDP file to connect you will need to change the username used to make the connection to the username you saved in the previous section.
- Download and then open the RDP file.
- Click Connect. The connection will fail as the default username is incorrect.
- Click More Choices.
- Click Use a different account.
- Enter the username and password you saved at the beginning of this section and then click OK to log in.
- When you see a security warning dialog stating that the identity of the remote computer cannot be verified click Yes.
-
When the initial RDP connection to the Windows machine opens click Yes to make this machine discoverable.
-
Open a PowerShell terminal as Administrator. (Click in the search box on the task-bar, type "PowerShell", and then with Windows PowerShell selected, press Shift-Ctrl-Enter.)
-
When prompted to allow this application to make changes to your device click Yes.
-
Set the Windows credentials for the Administrator account:
- You're prompted to create a password. Use a strong password, and store the password in safe location for future use. Even though this is a lab, you must follow the password creation rules.
The Administrator account will become a domain admin account after you've created the AD forest with it.
- Enable the account:
- Install Active Directory Domain Services, including Management Tools:
- Set the following PowerShell variables:
- Install the new Active Directory forest configuration in Windows Server 2016 mode:
-
When you're prompted, enter a Safe Mode Administrator password. Store the password in a safe location for future use.
-
Dismiss the following warnings. Each warning will appear two times, once during prerequisites verification and a second time during the installation process.
- Restart the virtual machine:
This will disconnect your RDP session. The machine will now take about a minute to restart.
-
Once it has restarted use RDP to connect to the domain controller
ad-dc1
with the Administrator credentials you defined during the AD forest installation.- Remember to add the domain name as a prefix, as in
EXAMPLE-GCP\Administrator
. - The initial log-in to the domain may take a few minutes as services such as group policies are initialized for the first time.
- Remember to add the domain name as a prefix, as in
WARNING Someone could be trying to intercept your communication. To connect anyway select Chrome RDP Options, select the Certificates tab, select the :3389 certificate listing and press the Delete Certificate button.
If you are using a built in Windows RDP client or a third party RDP client you will have to confirm that you accept the new certificate in order to connect.
- Open a PowerShell terminal as Administrator and set the following variables:
- Set the IP address and default gateway:
- Configure the primary DNS server:
- DNS server ad-dc2 will be available only after the second domain controller is deployed, so you can ignore the following error message:
ad-dc1
and ad-dc2
. You'll set up the ad-dc2
domain controller later in this lab.
- Configure the secondary DNS server:
- The DNS server entry for this domain controller,
ad-dc1
, should be second in the list in order to prevent AD from frequently losing connection with the other controller. Use the second domain controller,ad-dc2
, as the primary DNS server.
You'll create the ad-dc2
domain controller in the next section. If you don't follow this pattern, the following errors appear under Server Manager > Active Directory Domain Services:
You might see errors on the ad-dc1
server before both servers are fully configured. You can ignore these errors.
Task 5. Creating the second domain controller
Next you'll create a domain controller that has the following properties:
- Name:
ad-dc2
- IP Address:
10.2.0.100
- If your Cloud Shell window has expired, open a new Cloud Shell instance and reset the variables you set earlier. To do that, edit the following script to specify the project ID and region you used earlier:
-
Copy the script into your Cloud Shell window and run it.
-
Use Cloud Shell to create the second domain controller instance:
Click Check my progress to verify the objective.
- Wait approximately one minute, and then create a password for the Windows instance
ad-dc2
:
-
You will need to use the username and password to RDP into the Windows instance you created. Save the IP address, username and password, and label them for Domain Controller 2.
-
On the Google Cloud console.
-
Open Compute Engine > VM Instances.
-
Click ad-dc2 to open the VM instance Details page for the second ad machine.
-
Click RDP to open an RDP session to this instance.
-
When the initial connection to the Windows machine opens, click Yes to make this machine discoverable.
-
Open a PowerShell terminal as Administrator. (Click Start, type PowerShell, and then press Shift-Ctrl-Enter.)
-
When prompted to allow this application to make changes to your device click Yes.
-
Install Active Directory Domain Services, including Management Tools:
- Set the following PowerShell variables:
- Configure the primary DNS server:
- Configure the second server so that it acts as its own secondary DNS server:
The ad-dc2
DNS server will be available only after ad-dc2
is joined to the domain as a domain controller. Because the server hasn't been joined yet, you see the following message, but you can ignore it:
- Set the IP address and default gateway:
- Run the following PowerShell script, which will let you know when the first domain controller becomes operational. Wait until you see the Domain controller is reachable message.
- Set the following PowerShell variable again:
- Add the virtual machine to the forest as a second domain controller:
-
When you're prompted to provide a password for the Administrator account, use the Administrator credentials you defined during AD forest installation. Add the domain name as a prefix, as in
EXAMPLE-GCP\Administrator
. -
When you're prompted to enter a Safe Mode Administrator password, use the same password you used for the first domain controller.
-
Ignore the following warnings. Each warning appears twice: once during prerequisites verification, and a second time during the installation process.
- Restart the virtual machine:
Task 6. Testing the installation
-
Wait 5-10 minutes to make sure that both domain controllers are operational and are replicating information.
-
Using RDP, re-connect to the first domain controller instance using the Administrator credentials you defined during the first domain controller installation. Add the domain name as a prefix, as in
EXAMPLE-GCP\Administrator
. -
Once you are connected to the RDP session open a PowerShell console as Administrator if one is not already running.
-
Test that replication is working by running the following command in the PowerShell console:
- The output should resemble the following, with no errors or failures.
- If the domain controller is not available, you receive a message that resembles the following:
- If you receive this message, wait a couple of minutes and then retry the
repadmin /replsum
command.
Congratulations!
You have now successfully configured a Fault-Tolerant Microsoft Active Directory Environment.
Finish your quest
This self-paced lab is part of the Google Cloud Solutions I: Scaling Your Infrastructure and Windows on Google Cloud quests. A quest is a series of related labs that form a learning path. Completing this quest earns you a badge to recognize your achievement. You can make your badge or badges public and link to them in your online resume or social media account. Enroll in a quest and get immediate completion credit. See the Google Cloud Skills Boost catalog to see all available quests.
Take your next lab
Continue your quest with Deploying Memcached on Container Engine, or check out these suggestions:
Next steps / learn more
Here are some follow-up steps :
Google Cloud training and certification
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated January 10, 2024
Lab Last Tested January 10, 2024
Copyright 2024 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.