Install Domain Services
install-windowsfeature AD-Domain-Services
The -WhatIf command allows a preview of the Powershell command before execution. Remove after testing.
Install a Forest Active Directory
Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2012R2” -DomainName “[Parent_Domain].com” -DomainNetbiosName” [Parent_Domain]” -ForestMode “Win2012R2” -InstallDns:$true -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -SysvolPath “C:\Windows\SYSVOL” -Force:$true -WhatIf
Install a Tree Active Directory in the forest domain:
Install-ADDSDomain -NoGlobalCatalog:$false -CreateDNSDelegation:$true -Credential (Get-Credential) -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2012R2” -DomainType “ChildDomain” -InstallDNS:$true -LogPath “C:\Windows\NTDS” -NewDomainName “[Child_Domain]” -NewDomainNetBIOSName “[Child_Domain]” -ParentDomainName “[Parent_Domain].com” -Norebootoncompletion:$false -SiteName “LV1” -SYSVOLPath “C:\Windows\SYSVOL” -WhatIf