summaryrefslogtreecommitdiff
path: root/ansible/scripts/setup-tree-domain.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/scripts/setup-tree-domain.ps1')
-rw-r--r--ansible/scripts/setup-tree-domain.ps112
1 files changed, 6 insertions, 6 deletions
diff --git a/ansible/scripts/setup-tree-domain.ps1 b/ansible/scripts/setup-tree-domain.ps1
index 0f661a1..d6908c1 100644
--- a/ansible/scripts/setup-tree-domain.ps1
+++ b/ansible/scripts/setup-tree-domain.ps1
@@ -14,20 +14,20 @@ Start-Transcript -Path $logFile -Append
$p = ConvertTo-SecureString $Password -AsPlainText -Force
$c = New-Object System.Management.Automation.PSCredential("$ParentForestRootDomain\$Username", $p)
-Write-Host "[INFO] Setting Administrator password"
+Write-Host "[inf] Setting Administrator password"
$computerName = $env:COMPUTERNAME
$adminPassword = $Password
$adminUser = [ADSI] "WinNT://$computerName/Administrator,User"
$adminUser.SetPassword($adminPassword)
-Write-Host "[INFO] Installing AD-Domain-Services feature"
+Write-Host "[inf] Installing AD-Domain-Services feature"
Install-WindowsFeature AD-Domain-Services -IncludeAllSubFeature -IncludeManagementTools
-Write-Host "[INFO] Importing ADDSDeployment module"
+Write-Host "[inf] Importing ADDSDeployment module"
Import-Module ADDSDeployment
try {
- Write-Host "[INFO] Installing New Tree Domain in Existing Forest"
+ Write-Host "[inf] Installing New Tree Domain in Existing Forest"
Install-ADDSDomain `
-InstallDns `
-ParentDomainName $ParentForestRootDomain `
@@ -41,9 +41,9 @@ try {
-Credential $c `
-SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText -Force "$SafeModePassword")
- Write-Host "[INFO] Successfully added new tree domain: $NewTreeDomainName"
+ Write-Host "[inf] Successfully added new tree domain: $NewTreeDomainName"
} catch {
- Write-Host "[ERR] Failed to add new tree domain: $NewTreeDomainName"
+ Write-Host "[err] Failed to add new tree domain: $NewTreeDomainName"
Write-Host $_.Exception.Message
}