How to Create a New Active Directory Forest with PowerShell
Applies to: Windows Server 2019, 2022 and 2025.
This procedure promotes the first domain controller in a new forest and installs integrated DNS.
Active Directory changes affect authentication across the environment. Use tested backups, separate privileged accounts and a maintenance plan. See networkmanager.info for managed Windows VPS services.
Prerequisites
- Assign a static IP and approved hostname.
- Choose an internal DNS namespace controlled by the organization.
- Confirm console access and a tested backup.
- Use a secured dedicated server.
Procedure
Step 1: Install AD DS
Add role binaries and tools.
Install-WindowsFeature AD-Domain-Services -IncludeManagementToolsStep 2: Review deployment help
Inspect supported parameters.
Import-Module ADDSDeployment
Get-Help Install-ADDSForest -FullStep 3: Create the forest
Replace the example name and enter the DSRM password when prompted.
Install-ADDSForest -DomainName 'corp.example' -DomainNetbiosName 'CORP' -InstallDNSStep 4: Validate after restart
Confirm directory, DNS and shares.
Verification
Run directory and DNS diagnostics.
Get-ADDomain
Get-ADForest
Get-ADDomainController
Get-SmbShare -Name SYSVOL,NETLOGON
dcdiag /test:dnsRollback and recovery
Do not delete AD files manually. Remove a new forest only through an approved demotion or rebuild plan.
Operational notes
Functional levels must reflect every required domain controller version and interoperability requirement.
Official references
Explore managed Windows Server hosting from Netcloud24 Canada.