none
How to join (replacement) windows DC to Active Directory domain in cloud when failed instance is already registered RRS feed

  • Question

  • Hi,

    I've created an extensive AWS cloudformation template/scripting to create a highly available set of Active Directory/domain controllers. The solution utilizes AWS auto-scaling groups to detect when a DC fails and to automatically replace it. When the instances launch, I change their name from the AWS cryptic name to ADCxx where xx is 1-n making sure the name is not already in use by another running instances. All is working when I initially create the environment, but when I terminate one the DC instances (ADC02), its replacement fails when calling Add-Computer because ADC02 already exists in active directory (which doesnt know that the original ADC02 is dead). All of the scripting is done in powershell. I've tried various approached including using the -NewName switch on Add-Computer, joining the domain using the unique cryptic name and then renaming, trying to remove the existing name from A/D from the replacement instance while will in a workgroup but cant seem to find a reliable approach. 

    I need to be able to automate all of this so manually deleting the entry from A/D is not an option. Utilizing Windows 2012 R2

    Can anyone point me towards a workable approach.

    Thanks

    Scott

    Thursday, August 27, 2015 1:54 PM