When entering system/server administration, setting up a domain controller from scratch is an important step you must learn. This guide shows step by step on how to install and configure a new domain controller/Active directory in Windows 2022 as a virtual machine on VirtualBox.
The domain controller installation may vary depending on the existing forest/AD setup. But, we talk about setting up the first domain controller on a new forest here.
Gone are those days you need a separate server or additional physical computer to install a Windows server to do testing and practice. Nowadays, we can use the virtualization technology on the existing computer, which could be Windows 10 or 11, to install multiple server Operating Systems and create a working test lab.
Things you Need to Install Domain Controller in VirtualBox – Windows 10/11 Host:
- A powerful physical computer: Your computer should have enough hardware resources to allocate to the virtual machine. More processor cores, more than 8GB RAM, and SSD hard disk preferred.
- A Virtualization Software: Oracle VirtualBox, VMWare Workstation/Player, or built-in Hyper-V will work.
- Windows 2022 ISO or preinstalled VHD/VHDX
Installation Steps – Windows 2022 Active Directory
1) Install Windows 2022 server on VirtualBox by ISO or VHD file. You can find the steps here.
Prerequisites for Active Directory Role on Windows 2022 Server
Once the server is ready and logged in with the local administrator, we need to configure a few things before starting the domain controller installation.
- Change the time zone and set the correct time.
- Change the server name. Having a meaningful name for your domain controller server is always advisable. So, change the Windows 2022 server name from the server manager. Reboot the server to name change effect.
- Configure the static IP for the server.
- Decide the forest/domain name.
- Dedicating a server only for the Active directory role is highly recommended. Do not install any other major roles on this server.
2) Once the above Prerequisites are met, open the server manager. Click on Manage and ‘Add Roles and Features.’ Click Next.
3) Select ‘Role-based or feature-based installation’ that has the domain/Active directory role.
4) Select the local server to install the Active Directory setup. You can select the second option if you have a Windows server installation as VHD/VHDX file.
5) On the next screen, select the correct role to install AD DS services on Windows 2022 server. Once you select the ‘Active Directory Domain services,’ it will open another box to show its related features. Click ‘Add Features’ to continue the installation.
6) You can leave the next screen called ‘Select features’ without selecting any additional features. The Active Directory is a Role in the Windows server.
7) Click Next on the AD DS screen. It talks about the Azure Active Directory and relevant AD connect setup, which is not currently required.
8) Confirm the selection and click Install.
9) Let the installation complete and provide the confirmation message.
So far, we have only installed the Active directory Domain services on Windows 2022 server, which is not configured yet. Once the installation is completed, we need to set up our domain name, DNS settings, and other required configurations.
Promote and Setup Active Directory in Windows 2022
10) Click ‘Promote this server’ from the installation screen or server manager.
11) Since this server is the first domain controller of the new domain, select the ‘Add a new forest’ option.
Select the other options if adding this server to the existing domain as the additional domain controller.
Give a name for your domain. You should have decided this before starting the installation. Domain name can’t be changed after it.
12) You can select the forest and domain functional levels depending on the applications you install in this domain environment. I will go with the latest version on Windows 2022 server, which is Windows server 2016 level.
Configured the DSRM password on this screen. Make sure it meets the password complexity requirements. Otherwise, you can’t go to the next option.
13) Nothing to select from the next screen.
14) Leave the default NetBIOS name and continue the installation.
15) Without making any changes in the ‘Paths,’ click next.
Review the final options and click Next.
Once the validation passes successfully, start the installation. Following the proper order should not give any major errors for the new Active Directory setup or in an existing domain.
Once the installation is completed successfully, the server will be rebooted.
16) Log in with the earlier local Administrator password, which is the domain admin password now.
Changing the domain admin password is better if you provide a weak and common password for the earlier local administrator account.
How to know the new Domain Setup work?
17) Open the ‘Active Directory Users and Computers’ from the newly installed domain controller and check the OUs.
Navigate to ‘Domain Controllers’ and find out whether the server is properly placed and mentioned as GC (Global Catalog).
18) You can also issue a few PowerShell commands to confirm the properly working Active Directory environment in Windows 2022 server.
The above command output shows the clear result of the running roles and services on the Windows 2022 server. Also, more details of the domain controller can confirm that this server is properly configured for AD DS services.
19) The best test we can do from outside the domain controller is to join a PC to the newly created domain. Create a domain user name and log in from the new client PC to this domain. If this process works fine, that confirms that the new AD setup on Windows 2022 server is perfect.
I will show how to join a Windows 11 client PC to Windows 2022 Active directory in the coming days.
This method could be ideal for setting up a domain controller, additional servers, and a few client computers as a virtual machine on VirtualBox, VMware, or Hyper-V with a powerful Windows 11/10 host computer for learning purposes.
It is another best way to do lab practice for Microsoft certifications instead of paying for online labs.