demo-terraform/windows-ad/populate_ad/run.ps1

31 lines
751 B
PowerShell
Raw Normal View History

2024-11-14 18:43:01 +00:00
<#
data "template_file" "init" {
template = "${file("populate_ad/run.ps1.tpl")}"
vars = {
forest_mode = ""
domain_mode = ""
domain_name = "${aws_instance.some.private_ip}"
domain_netbios_name = ""
safe_mode_password = ""
domain_admin_password = ""
}
}
#>
# Configure new domain
$DomainName = "${domain_name}"
$DomainNetBiosName = "${domain_netbios_name}"
$DomainMode = "${domain_mode}"
$ForestMode = "${forest_mode}"
$SafeModePassword = ConvertTo-SecureString -AsPlainText "${safe_mode_password}" -Force
$DomainAdminPassword = ConvertTo-SecureString -AsPlainText "${domain_admin_password}" -Force
2024-11-14 18:35:16 +00:00
$PSScriptRoot/install.ps1
$PSScriptRoot/create_ous.ps1
$PSScriptRoot/create_groups.ps1
$PSScriptRoot/create_users.ps1