Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Add-Computer to domain with new name returns error

$
0
0

Hi Folks:

I am writing a script that configures servers and joins them to a domain. Near the end of the script I've added the command,

Add-Computer -DomainName 'domainname' -Credential (Get-Credential 'domain\Administrator') -OUPath 'path' -NewName 'CONSOLE' -Force

I receive the error message:

Add-Computer : Computer 'WIN-TLDK7T4SNDE' was successfully joined to the new domain 'domainname', but renaming it to 'CONSOLE' failed with the following error message: The directory service is busy.

CategoryInfo: OperationStopped: (WIN-TLDK7T4SNDE:String) [Add-Computer], InvalidOperationException

FullyQualifiedErrorId: FailToRenameAfterJoinDomain,Microsoft.Powershell.Commands.AddComputerCommand

The error is intermittent and I've tried this on various configurations using Windows Server 2012 core for the domain controller(s). Here are the configurations that I've tried:

1. A primary domain controller in its own forest

2. A primary domain controller in its own forest with a backup domain controller (DNS on primary domain controller points to backup domain controller address with loopback address as secondary, DNS on backup points to primary domain controller address with loopback as secondary.) I've run 'repadmin /syncall' and it seems to replicated just fine.

I'm testing the system on VMware Workstation 9.2 where the occurs with some frequency and I've also but a sandbox system using older computers and it occurs nearly all the time.

I've scanned the forums and Googled the error without much success. Any ideas? Thanks in advance!

Have a GREAT DAY!!

Shaun


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>