Windows Server: Headless Domain Controller Setup
From wiki.jacobjohns.com

- Create the VM
- 4 CPU
- 8GB RAM
- Hard Disk 1 @ +125GB
- Hard Disk 2 @ +20GB
- Install Windows Server Core
- Via CLI run the below or create a .ps1 file and execute it.
$domain = "domain.com" $creds= Get-Credential -Username "domain\domainAdminUser" $sitename = "SiteName" $databasepath = "E:\NTDS" $logpath = "E:\NTDS" $sysvolpath = "E:\SYSVOL" Initialize-Disk -Number 1 New-Volume -DiskNumber 1 -FileSystem NTFS -FriendlyName Data -DriveLetter E Install-WindowsFeature -Name AD-Domain-Services, DNS -IncludeManagementTools -Confirm:$false Install-ADDSDomainController -CreateDnsDelegation:$false -DatabasePath $databasepath -DomainName $domain -InstallDns:$true -LogPath $logpath -NoGlobalCatalog:$false -SiteName $sitename -SysvolPath $sysvolpath -Force:$true -Credential $creds
