Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configure-ADForest.ps1 PowerShell script used by CloudFormation template to deploy Active Directory Domain Services
param (
# Create New Forest, add Domain Controller
Import-Module ADDSDeployment
#Convert the SafeModeAdministratorPassword to a secureString
$SecuredSafeModeAdministratorPassword = ConvertTo-SecureString -String $SafeModeAdministratorPassword -AsPlainText -Force
Install-ADDSForest -CreateDnsDelegation:$false `
-DomainName $DomainName `
-DomainNetbiosName $DomainNetbiosName `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode $DomainMode `
-ForestMode $ForestMode `
-SafeModeAdministratorPassword $SecuredSafeModeAdministratorPassword `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.