Skip to content

Instantly share code, notes, and snippets.

@8bitnz
Last active June 14, 2022 22:06
Show Gist options
  • Save 8bitnz/ea12d86e3435871cf2d22cfe9275373f to your computer and use it in GitHub Desktop.
Save 8bitnz/ea12d86e3435871cf2d22cfe9275373f to your computer and use it in GitHub Desktop.
Deploy AD PowerShell
Install-WindowsFeature AD-Domain-Services
$ForestConfig = @{
CreateDnsDelegation = $false
DatabasePath = 'C:\Windows\NTDS'
DomainMode = 'Win2012R2'
DomainName = 'yourdomain.com'
DomainNetbiosName = 'YOURDOMAIN'
ForestMode = 'Win2016'
InstallDns = $true
LogPath = 'C:\Windows\NTDS'
NoRebootOnCompletion = $false
SysvolPath = 'C:\Windows\SYSVOL'
Force = $true
}
Install-ADDSForest @$ForestConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment