Setup Server 2022 as a DC in a new Forest & Domain
-
Had a need to deploy a brand new Windows AD network.
- Install Server 2022.
- I added the Desktop Environment, as I will not be the main manager down the line.
- Log in with the
Administrator
account and set a password - Run the updates and reboot
- Activate Windows
- Run more updates and reboot
- Launch PowerShell as an Admin
- Rename the system
- Server 2022 defaults to a random name on install.
Rename-Computer -NewName dc
- Server 2022 defaults to a random name on install.
- Reboot to apply
Restart-Computer
- Login as Administrator
- Start PowerShell with Admin rights again
- Set a Static IP Address
- Use something appropriate for your network
- Assumption here is that you only have one NIC
New-NetIPAddress -IPAddress 10.101.0.21 -DefaultGateway 10.101.0.1 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex
- Set DNS to itself on the adapter.
Set-DNSClientServerAddress -InterfaceIndex (Get-NetAdapter).InterfaceIndex -ServerAddresses 10.101.0.21
- Install AD Feature and tools
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
- Create the New Forest and Domain.
Install-ADDSForest -DomainName ad.domain.com -DomainNetBIOSName AD -InstallDNS
- You will need to set a Administrator password for Safe Mode
- Then Answer yes, you will see some warnings.
- After which, you will be forcibly rebooted
- Now you can log in to your new DC
- Install Server 2022.