Sitemap
Leon B.

Leon B.

Cloud DevOps Engineer. Self starter and motivated to troubleshoot and help upscale a business. Enjoy working collaboratively to connect our thoughts.

Active Directory Setup with Azure

6 min readMar 26, 2025
Press enter or click to view image in full size

Projects Overview: In this project we will be using Microsoft Azure to host our Virtual Machines in order to complete this project. We will be connecting to our VM’s by RDP, and install and Setup Active Directory. We will create Organizational Units, users, Administrators, and a domain controller. Next we will create a domain and allow a computer to join that domain. We will install a script that will create 10,000 users and implement a password for all users and have each user join the Employee OU. Lastly we will implement password policies for all users and purposefully enter wrong passwords to lock a user account and reset it due to the custom configured password policy.

Press enter or click to view image in full size

● Lets start our lab by creating a resource group in Azure to host all our our resources we are going to create.

Press enter or click to view image in full size

● We will need to create our virtual network to allow communication for our resources to communicate.

Press enter or click to view image in full size

● A virtual machine will be needed to create our user account computer that will basically be the ADMIN account.

Press enter or click to view image in full size

●When configuring our VM we need to allow port 3389 which is RDP. RDP is allowing us to connect and control another computer remotely.

Press enter or click to view image in full size

●Use an existing License.

Press enter or click to view image in full size

● Create the VM!

Press enter or click to view image in full size

● Now we can create another VM and this will be our test or user account.(Think of this as a user in the Finance or health department employee)

Press enter or click to view image in full size

●For this instance we will choose the image type Windows 10.

Press enter or click to view image in full size

●Don’t forget to allow RDP

Press enter or click to view image in full size

● For our first VM created we edit the IP Configuration and will allow static IP address so this way we can enable RDP.

Press enter or click to view image in full size

IF YOU ARE USING A WINDOWS COMPUTER TO DO THIS LAB WINDOWS 11, THEN YOU NEED TO INSTALL REMOTE DESKTOP. After you install Remote Desktop then you will add both VM’s you created.

Press enter or click to view image in full size

●On the first VM we click on add roles and features.

●Next we want to configure and add roles and features.

Press enter or click to view image in full size

●Begin installing roles and features and keep hitting next.

Press enter or click to view image in full size

●Add active directory domain services and hit next.

Press enter or click to view image in full size

●Restart if required enabled and finish the install.

Press enter or click to view image in full size

● Create a domain controller.

Press enter or click to view image in full size

●Active directory isn’t a domain controller yet so we will have to add a new forest and create a domain name.com, HIT next once you created a name.

Press enter or click to view image in full size

●Now install

Press enter or click to view image in full size

●We have successfully installed our domain name to our controller, so now we can sign in with the domain name.

Press enter or click to view image in full size

●Next we can create a new organizational unit for our Employees under the new domain we have created.

●We need another organizational unit for Administrators under the same domain.

Press enter or click to view image in full size

● In that Admin Organizational Unit you can right click and click on new user.

●So now we can create a new Admin user that will follow the domain login name, we will also add a password.

●We can right click the user Mike in Admin and head over to the MEMBER OF and add the object called domain admins we will also check names and the group will be found. Click Ok

Press enter or click to view image in full size

●Next we will sign in into our other VM and add the Client computer to join the domain.

Press enter or click to view image in full size

●When I come back to the Active Directory controller VM I see that we have successfully added out Client1 computer to the domain because it has shown up present.

Get Leon B.’s stories in your inbox

Join Medium for free to get updates from this writer.

●Now we will sign back into our VM with Mike apple the administrator account.

Press enter or click to view image in full size

●Now we will add domain users to the domain name we already created earlier. This will allow users to access this group by logging in.

Press enter or click to view image in full size

Now lets open up powershell as an administrator, we will create a new file and paste the script and run it. This is a script that will create 10,000 users.

●In our organizational unit of Employees, we can see the 10,000 users have been added.

Press enter or click to view image in full size

●Now we are going to set a password policy and account lockout using Group Policy Management for our users.

Press enter or click to view image in full size

●So now we will set the lockout policy. Now we can navigate by going to Computer configuration> Policies> Window Settings> Security Settings> Account Policies> Account Lockout Policy.

Press enter or click to view image in full size

●We will configure our settings to lockout the account after 5 failed attempts/ lockout duration will be an 18 minute wait.

Press enter or click to view image in full size

●In our Admin account we will run the command to forcefully update the configuration changes we made. The Computer policy and User policy has both been successfully updated. The force update will update all policies old and new.

Press enter or click to view image in full size

●Now we can sign into a user and enter incorrect passwords purposefully and… after 5 attempts the account has successfully been locked out.

Press enter or click to view image in full size

●Now we will log back in as the Admin which is Mike, we will unlock our user “her.robe” account and allow the user to be able to use the account back again.

Press enter or click to view image in full size

●Now we can successfully log back in with the user “her.robe”……..IT WORKED!!!!!

Conclusion: Thank you for taking the time to view my lab on active directory using Azure Virtual machines. I hope you find this documentation informational and I hope it helps you. Any questions/comments/concerns you can message me on LinkedIn.

--

--

Leon B.
Leon B.

Written by Leon B.

Cloud DevOps Engineer. Self starter and motivated to troubleshoot and help upscale a business. Enjoy working collaboratively to connect our thoughts.