Created
April 22, 2017 14:44
-
-
Save PixelRobots/852e3675270c17d084f93074b595d59b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ADDS and all management tools | |
Add-WindowsFeature -Name “ad-domain-services” -IncludeAllSubFeature -IncludeManagementTools | |
# Add Domain Controller to existing Forest | |
write-Host "Add Dc to existing Forest" | |
$domainname = Read-Host "Enter Domain Name you want to join eg: ad.contoso.com" | |
$sitename = read-host "Enter name of site to join. eg: Default-First-Site" | |
Import-Module ADDSDeployment | |
Install-ADDSDomainController ` | |
-NoGlobalCatalog:$false ` | |
-CreateDnsDelegation:$false ` | |
-Credential (Get-Credential) ` | |
-CriticalReplicationOnly:$false ` | |
-DatabasePath "C:\Windowes\NTDS" ` | |
-DomainName:$domainname ` | |
-InstallDns:$true ` | |
-LogPath "C:\Windowes\NTDS Logs" ` | |
-NoRebootOnCompletion:$false ` | |
-SiteName:$sitename ` | |
-SysvolPath "C:\Windowes\SYSVOL" ` | |
-Force:$true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment