Windows Server: Headless Domain Controller Setup: Difference between revisions
From wiki.jacobjohns.com
Created |
Added content |
||
| Line 1: | Line 1: | ||
[[File:Windows Server Logo.png|center|thumb]] | [[File:Windows Server Logo.png|center|thumb]] | ||
<hr /> | |||
# 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" | |||
$domainAdmin = "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 (Get-Credential -Username $domainAdmin) | |||
Revision as of 22:23, 19 February 2025

- 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" $domainAdmin = "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 (Get-Credential -Username $domainAdmin)
