Set Up a Domain Controller in Azure Using Virtual Machines
Promote two Windows Server VMs in an availability set to domain controllers, connecting through Azure Bastion after each reboot.

Lab overview
Active Directory Domain Services (AD DS) is the identity and access foundation for most Windows enterprise networks. Domain controllers authenticate users, store directory data, and replicate that state so a single server outage does not take down logon. On Azure, the same AD DS role runs on Windows Server virtual machines: you place those VMs in an availability set, give them static private IPs, and store NTDS.dit and SYSVOL on a dedicated data disk with host caching disabled so Azure disk caching cannot cause USN rollback.
This lab uses that IaaS pattern. Two Windows Server 2022 VMs are already deployed behind Azure Bastion. Promotion reboots each server more than once, so you connect from the Azure Portal with Bastion rather than a persistent desktop session. You initialize the data disks, promote the first VM as a new cloudlearn.local forest, point the virtual network DNS at it, promote the second VM as a replica, and confirm replication health.
Objectives
By completing this intermediate lab, you will be able to:
- Explore a pre-provisioned Azure environment with virtual machines, networking, and availability sets
- Initialize dedicated data disks and install the Active Directory Domain Services role using Server Manager
- Promote a virtual machine to a domain controller and create a new Active Directory forest
- Configure a second VM as a replica domain controller in the same domain for high availability
- Update Azure Virtual Network DNS settings to use the domain controllers' static private IP addresses
Who is this lab for?
This lab is designed for:
- Cloud administrators and IT professionals who deploy and manage IaaS-based Active Directory on Azure virtual machines
- Systems engineers who extend or migrate on-premises Active Directory into Azure using virtual machines
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.
More labs like this
Create an Azure Virtual Machine Scale Set
In this lab, you will create a Virtual Machine Scale Set in Azure with a custom scaling rule.
Azure Virtual Network Peering - Connect VNets for Secure Communication
Learn how to configure and test virtual network peering in Azure.
Configure Custom DNS Settings for an Azure Virtual Network
Configure custom DNS servers for an Azure VNet, apply DNS settings at the VNet and NIC level, and verify name resolution between virtual machines
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Logging into Azure Account using Azure Portal
- 02
Explore the Pre-Provisioned Environment for the Domain Controller Setup
1 automated check
- 03
Install AD DS and Promote the First Domain Controller
1 automated check
- 04
Configure DNS and Promote the Second Domain Controller
1 automated check
- 05
Verify Active Directory and DNS Configuration
1 automated check
Skills validated
Not the lab you were looking for?
Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.