部署域服务,新建林和DnsServer.
修改计算机名称,修改完成重启。
Rename-Computer -NewName "H2019-DC01" -Restart
安装活动目录域服务及管理工具;
新建林并安装DNSServer服务,林和域级别 2012R2
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 [-SkipPreChecks] [-SafeModeAdministratorPassword ]
# [-CreateDnsDelegation] [-DatabasePath ] [-DnsDelegationCredential ] [-NoDnsOnNetwork]
# [-DomainMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-DomainNetbiosName ]
# [-ForestMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-InstallDns] [-LogPath
# ] [-NoRebootOnCompletion] [-SkipAutoConfigureDns] [-SysvolPath ] [-Force] [-WhatIf] [-Confirm]
# []
# 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"
Quoting:https://learn.microsoft.com/en-us/powershell/module/addsdeployment/install-addsforest?view=windowsserver2022-ps