Server Series - Windows 2022 Domain Controller
Download Windows Server 2022 from: https://www.microsoft.com/en-us/evalcenter/
- Install Windows Server 2022
* Windows Server 2019 System Requirements:
Processor: 1.4 GHz 64-bit processor
RAM: 512 MB
Disk Space: 32 GB
Network - Gigabit (10/100/1000baseT) Ethernet adapter
Optical Storage - DVD drive (if installing the OS from DVD media)
Video - Super VGA (1024 x 768) or higher-resolution (optional)
Input Devices - Keyboard and mouse (optional)
Internet - Broadband access (optional)
A domain controller is a server computer that responds to security authentication requests within a computer network domain. It is a network server that is responsible for allowing host access to domain resources. It authenticates users, stores user account information and enforces security policy for a domain. – Wikipedia
In this guide, we will go through the process of creating a AD forest and promoting our computer to a domain controller. We will go through the process using Server Manager in the GUI on our computer, then we will see how we can do this using PowerShell.
– USING THE GUI
- Open Server Manager
- Click on Manage > Add Roles and Features
- Click Next, then select Role-based or Feature-based Installation
- Verify that Select a server from the server pool is selected and that the server is selected, click Next
- Check Active Directory Domain Services and DNS Server
- Click Add Features in the popup box to include/install all required features for each role selected. For DNS Server, if a popup warning displays warning that the server does not have a static IP, go ahead and click Continue
- Click Next
- Check .NET Framework 3.5 Features
- Click Next through each page and install all roles and features selected
- Click Close
- In Server Manager, click the Notifications (it should have a warning next to it) > Promote this server to a domain controller
- Select Add a new forest
- Enter a name for our new domain (Example: newDomain.ad)
- Click Next
- Enter a new Directory Services Restore Module password
- Click Next
- On the DNS Options window, click Next to proceed
- Verify NetBIOS name, then press Next and continue on through with completing installation.
- Once installation is complete, server will restart
– USING POWERSHELL (2 Steps)
- Rename Computer:Using PowerShell:
1
Rename-Computer -NewName "DC-01" -LocalCredential localhost\Administrator -Restart
You will be prompted for your Administrator password, and the computer will restart
- Create the AD forest and set the computer as the domain controller:Using PowerShell, open PowerShell ISE and run the following script: https://github.com/robjschroeder/Windows-PowerShell/blob/main/CreateDomainControllerForest.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Add the Windows Features for AD
Add-WindowsFeature AD-Domain-Services
Add-windowsfeature RSAT-ADDS
# Prompt For Variables
$SafetModeAdministratorPasswordText = Read-Host -Prompt "Enter your Safe Mode Administrator Password"
$DomainName = Read-Host -Prompt "Enter what you would like your domain to be. (ex. LAB.ADSecurity.org)"
$SiteName = Read-Host -Prompt "Enter what you would like your site name to be (ex. LAB)"
# Convert Text Password To Secure String
$SafeModeAdministratorPassword = ConvertTo-SecureString -AsPlainText $SafetModeAdministratorPasswordText -Force
# Create the domain
Import-Module ADDSDeployment
Install-ADDSForest -CreateDNSDelegation:$False -DatabasePath “c:\Windows\NTDS” -DomainMode ‘Win2012’ -DomainName “$DomainName” -DomainNetbiosName “$SiteName” -ForestMode ‘Win2012’ -InstallDNS:$true -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -Sysvolpath “C:\Windows\SYSVOL” -Force:$true -SafeModeAdministratorPassword $SafeModeAdministratorPassword
- Take note of your DC’s IP address as we will use it as the DNS address for all other computers in the test lab environment.
It may also be a good idea at this point to create a new domain user that you can use for all your administrative tasks. Add this user to the Enterprise Admins and Domain Admins security groups for now.










