- Microsoft Azure (Virtual Machines/Compute)
- Remote Desktop
- Active Directory Domain Services
- PowerShell
- Windows Server 2022
- Windows 10 (22H2)
- Preparing the AD Infrastructure in Azure
- Deploying Active Directory
- Creating Users with PowerShell
- Group Policy and Managing Accounts
- Create a Resource Group:
- Navigate to the Azure Portal and create a new Resource Group for the lab environment.
- Create a Virtual Network and Subnet:
- Set up a Virtual Network with a subnet to host your VMs.
- Create the Domain Controller VM (Windows Server 2022):
- Name the VM:
DC-1. - Ensure that the VM is on the Virtual Network created previously.
- Name the VM:
- Set Static Private IP for DC-1:
- After the VM is created, navigate to its Network Interface Card (NIC) settings and set the private IP to static.
- Disable Windows Firewall:
- Log in to
DC-1and disable the Windows Firewall for testing connectivity.
- Log in to
- Create the Client VM (Windows 10 22H2):
- Name the VM:
Client-1.
- Name the VM:
- Attach Client-1 to the Same Region and Virtual Network:
- Ensure it is in the same Virtual Network and subnet as
DC-1.
- Ensure it is in the same Virtual Network and subnet as
- Set DNS Settings:
- Update
Client-1's DNS settings to point toDC-1's private IP address.
- Update
-
Test Connectivity:
- Restart
Client-1from the Azure Portal. - Log into
Client-1and use thepingcommand to test connectivity withDC-1.
- Restart
-
Verify DNS Settings:
- Run
ipconfig /allin PowerShell onClient-1to ensure the DNS points toDC-1.
- Run
- Log in to
DC-1. - Install Active Directory Domain Services (AD DS).
- Promote
DC-1as a Domain Controller and set up a new forest (e.g.,mydomain.com). - Restart
DC-1and log in asmydomain.com\labuser.
- Open Active Directory Users and Computers (ADUC).
- Create an Organizational Unit (OU) named
_EMPLOYEES. - Create another OU named
_ADMINS. - Add a new user:
- Name:
Jane Doe - Username:
jane_admin - Password:
Cyberlab123!
- Name:
- Add
jane_adminto theDomain Adminssecurity group. - Log out and log back in as
mydomain.com\jane_admin.
- Log in as the local admin and join
Client-1to the domain. - Create a new OU titled '_CLIENTS' & add
Client-1in ADUC to_CLIENTS.
- Log into
Client-1asmydomain.com\jane_admin. - Open System Properties and enable Remote Desktop.
- Allow "domain users" access to Remote Desktop.
- Log in to
DC-1asjane_admin. - Open PowerShell ISE as an administrator.
- Create multiple new users using a script (script link: https://github.com/joshmadakor1/AD_PS/blob/master/Generate-Names-Create-Users.ps1).
- Verify users appear in the
_EMPLOYEESOU in ADUC. - Attempt to log into
Client-1with one of the created accounts.
- Log in to
DC-1. - Open Group Policy Management.
- Edit the Default Domain Policy:
- Set account lockout threshold to 5 invalid attempts.
- Attempt to log in with a user account using incorrect passwords. Observe the account lockout behavior.
- Unlock the account in ADUC and reset the password.
- Disable a user account in ADUC.
- Attempt to log in with the disabled account and observe the error message.
- Re-enable the account and log in successfully.
- Review authentication and account-related logs in Event Viewer:
- Log on
DC-1for domain-level events (shown below). - Log on
Client-1for local events.
- Log on
Congratulations! You have successfully deployed and configured an on-premises Active Directory environment in Azure.






























