powershell
$cn = hostname
netdom renamecomputer $cn /NewName:DC1
netsh interface ip set address "Ethernet" static 192.168.10.1 255.255.255.0 192.168.10.254
netsh interface ip add dns "Ethernet" 192.168.10.1
netsh interface ip add dns "Ethernet" 192.168.10.254 index=2
powershell
Install-WindowsFeature AD-Domain-Services
$SafePass = Read-Host "Password" -AsSecureString
Install-ADDSForest -DomainName domain.local -DomainNetbiosName MYDOMAIN -ForestMode Win2012R2 -DomainMode Win2012R2 -InstallDNS -NoDnsOnNetwork -SafeModeAdministratorPassword $SafePass
powershell
Add-DnsServerPrimaryZone -NetworkID "192.168.10.0/24" -ReplicationScope "Forest"
cscript C:\Windows\System32\Scregedit.wsf /ar 0
netsh advfirewall set currentprofile state off