Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "corp.contoso.com" -InstallDNS -DomainMode Win2012R2 -ForestMode Win2012R2
# Install-ADDSForest WinSer 2019 Syntax
# NAME
# Install-ADDSForest
#
# SYNTAX
# Install-ADDSForest -DomainName <string> [-SkipPreChecks] [-SafeModeAdministratorPassword <securestring>]
# [-CreateDnsDelegation] [-DatabasePath <string>] [-DnsDelegationCredential <pscredential>] [-NoDnsOnNetwork]
# [-DomainMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-DomainNetbiosName <string>]
# [-ForestMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-InstallDns] [-LogPath
# <string>] [-NoRebootOnCompletion] [-SkipAutoConfigureDns] [-SysvolPath <string>] [-Force] [-WhatIf] [-Confirm]
# [<CommonParameters>]
# Example: Install a new forest and a DNS delegation
# Install-ADDSForest -DomainName "corp.contoso.com" -CreateDNSDelegation -DomainMode Win2008R2 -ForestMode Win2008R2 -DatabasePath "d:\NTDS" -SysvolPath "d:\SYSVOL" -LogPath "e:\Logs"