Setup static IP Open Powershell Install ADDS
Install-WindowsFeature AD-Domain-Services #or Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Commands:
This will install the basic features and functions, however, if you want to install a customised setup – which I assume you would want to do – in a proper business environment, I will provide a sample setup for you to follow. I will lay this out line per line, to make for easy reading, but when you are passing the parameters, please be sure not to break lines anywhere. The line breaks in my example are just for readability:
Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2012R2” //use integer 7 for Win2016 -DomainName “contoso.com” -DomainNetbiosName “CONTOSO” -ForestMode “Win2012R2” //use integer 7 for Win2016 -InstallDns:$true -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -SysvolPath “C:\Windows\SYSVOL” -Force:$true
Install-ADDSDomainController -DomainName contoso.com -InstallDNS:$True –Credential (Get-Credential)
Transfering roles to the new server
add-computer -DomainName contoso.com -Credential (Get-Credential)
Install-ADDSDomain -NewDomainName sub -ParentDomainName contoso.com -InstallDNS -CreateDNSDelegation -DomainMode 7 -SafeModeAdministratorPassword (Get-Credentials) -Credentials (Get-Credentials)