terraform-provider-ad
terraform-provider-ad copied to clipboard
Support for configuring a new domain/forest
Description
You can install and configure Domain Services with Powershell. Certainly the initial setup is possible, although I'm not sure how updatable it is.
Example PowerShell
Preamble / installing the role:
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Get-Command -Module ADDSDeployment
Create new forest:
Install-ADDSForest -DomainName fqdn -DomainNetbiosName DOMAIN -CreateDnsDelegation:$false -InstallDns:$true -SafeModeAdministratorPassword (Read-Host -Prompt "Safe Mode Password" -AsSecureString)
Add to existing domain:
Install-ADDSDomainController -InstallDns -Credential (Get-Credential DOMAIN\Administrator) -DomainName DOMAIN -SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText "Pa$$w0rd" -Force)
References
Found this via a blog post https://sid-500.com/2017/07/01/powershell-how-to-install-a-domain-controller-with-server-core/
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
I think the preference for this is to execute it as a custom extension of the VM. That works just fine.
@Lucero7919 That sounds like it would makes sense when deploying onto an Azure VM, but not for any other deployment scenario?