トラブルシューティングとして、winrm を有効にし、ファイアウォールを無効にし、リモート処理を有効にし、winrm の GPO を有効にし、SMBv1 を有効にし、最初に更新を完了しましたが、それでもエラーが発生します。DC に ping を実行することもできます。
表示されるエラーは次のとおりです:
Add-Computer: Computer "server2019' failed to join domain 'dev.domain.com' from its current workgroup 'WORKGROUP' with following error message: An internal error occurred.
At line:1 char:1
Add-Computer -DomainName dev.domain.com -OUPath "OU=$OU,dc=dev,dc=domain,dc=com" ...
CategorvInfo :Operation5topped: (server2019:5tring) [Add-Computer]
. InvalidoperationException
+ FullvOualifiedErrorId:FailToJoinDomainFromworkgroup,Microsoft.PowerShell.Commands.AddComputerCommand
以下は、結合を実行するスクリプトの部分です。
[String]$OU,
[PSCredential]$Credential
)
$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
if ([Environment]::UserInteractive) {
if (!$OU) { $OU = Read-Host "Enter Resource Pool Name (exactly as appears in vCenter inventory)" }
if (!$Credential) { $Credential = Get-Credential -Message "Enter dev domain credentials" }
}
# Add Computer to Dev domain
try {
Add-Computer -DomainName dev.domain.com -OUPath "OU=$OU,dc=dev,dc=domain,dc=com" -ErrorAction stop -Credential $Credential
}
catch {
Write-Warning "Failed to join to domain."
Read-Host -Prompt "Press Enter to exit"
Throw $_
}
PS C:\Windows\ system32> nltest.exe/dsgetdc:dev.domain.com
DC: \\devad02.dev.domain.com
Address: \\10.1.214.29
Do Guid: ae3bef55-dd18-4598-b809-2058516e6abl
Dom Name: dev.domain.com
Forest Name: dev.domain.com
De Site Name: SITE
Our Site Name: SITE
Flags: GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE FULL_SECRE
TWS D5_8 D5_9 D5_10 0x20000
The command completed successfully
編集: サーバー マネージャーに、エラー コード 1359 を返す NetJoin のエラー イベントが表示されました。以下を実行してみました:
nltest /dclist:MYDOMAIN
そして次のようになりました:
You don't have access to DsBind to dev.domain.com
私も実行してみました:nltest /server:UserSyncServer /sc_reset:domain\devdc
そして、次の結果が出ました:I_NetLogonControl failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE
答え1
Microsoft は、ドメイン コントローラーで MsDS-SupportedEncryptionTypes を RC4 から AES に変更することを提案しましたが、私の場合は、送信および転送推移的な DC 間の信頼を削除して再度追加することで解決しました。
答え2
この解決策は私にとっては有効です。DCのレジスタでAllwNt4Cryptoを無効にする https://learn.microsoft.com/es-mx/services-hub/health/remediation-steps-ad/disable-the-allownt4crypto-setting-on-all-affected-domain-controllers