Install-ADDSDomainController Hangs



我使用以下代码来推广dc。我得到了几个警告,如预期的那样,没有错误,但它挂起后的警告"无法创建此DNS服务器的委托,因为无法找到授权的父区域。

Powershell似乎正在尝试这两个选项"确定复制源dc";以及"配置本地计算机以托管Active Directory域服务";如图所示。Powershell警告和信息

Write-Host "`nPromoting Server to a DC..."
$Error.Clear()     

#Get Domain name
$domain = $env:USERDNSDOMAIN

#Promote DC
#Promote DC
try {
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-Credential (Get-Credential) `
-CriticalReplicationOnly:$false `
-DatabasePath "C:WindowsNTDS" `
-DomainName $domain `
-InstallDns:$true `
-LogPath "C:WindowsNTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:WindowsSYSVOL" `
-Force:$true
}
catch { #Not all errors are getting caught here
Write-Host "`n`nThere was an error promting DC!" -ForegroundColor Red
Write-Host "`nReview error below and rerun script:" -ForegroundColor Yellow
Read-Host "Press any key to continue..."
Write-Host "`n $error"
Exit
}

问题是由于登录名。

需要域用户名输入凭据时。

如果不包含域将启动并执行一些推广任务,但最终会挂起。

最新更新