Skip to content

Instantly share code, notes, and snippets.

@PixelRobots
Created April 22, 2017 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PixelRobots/fc6c6b9e99bceb2975c4bdbf0abc47cf to your computer and use it in GitHub Desktop.
Save PixelRobots/fc6c6b9e99bceb2975c4bdbf0abc47cf to your computer and use it in GitHub Desktop.
# Create New Forest, add Domain Controller
write-Host "Create Forest and Promote 1st DC"
$domainname = Read-Host "Enter Forest Name eg: ad.pixelrobots.co.uk"
$netbios = Read-Host "Enter Netbios Name eg: pixelrobots"
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\NTDS" `
-DomainMode "7" `
-DomainName:$domainname `
-DomainNetbiosName:$netbios `
-ForestMode "7" `
-InstallDns:$true `
-LogPath "C:\NTDS Logs" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\SYSVOL" `
-Force:$true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment