Sylver SCHORGEN Blog's

Articles, astuces et news sur les technologies Microsoft et plus particulièrement tournant autour de Powershell


Today I'm writing a little article on how to deploy ADDS on a server core.


Installation of the role

If you want to deploy ADDS, you need to enter the following command : Add-WindowsFeature -Name "ad-domain-services" -IncludeAllSubFeature

Deployment of the 1st domain controller in the Forest

To deploy you first domain controller, you need to create some variables. They will contained some mandatory values needed by the PowerShell command (for more information --> :

$CreateDnsDelegation = $false
$DomainName = "demo.lan"
$NetbiosName = "DEMO"
$NTDSPath = "C:\Windows\NTDS"
$LogPath = "C:\Windows\NTDS"
$SysvolPath = "C:\Windows\SYSVOL"
$DomainMode = "WinThreshold"
$InstallDNS = $true
$ForestMode = "WinThreshold"
$NoRebootOnCompletion = $false
$SafeModeClearPassword = "P@$$w0rd"
$SafeModeAdministratorPassword = ConvertTo-SecureString $SafeModeClearPassword -AsPlaintext -Force

The next step is to execute the following command (it will create your domain and promote your server as a domain controller) : 

$forest = Install-ADDSForest -CreateDnsDelegation:$CreateDnsDelegation `
-DomainName $DomainName `
-DatabasePath $NTDSPath `
-DomainMode $DomainMode `
-DomainNetbiosName $NetbiosName `
-ForestMode $ForestMode `
-InstallDNS:$InstallDNS `
-LogPath $LogPath `
-NoRebootOnCompletion:$NoRebootOnCompletion `
-SysvolPath $SysvolPath `
-SafeModeAdministratorPassword $SafeModeAdministratorPassword `

Facebook Like