- Active Directory Administration Cookbook
- Sander Berkouwer
- 239字
- 2021-06-24 14:42:11
Supplying the information for the new domain controller configuration
The new domain controller that will be created when an existing domain controller is cloned, will need to be different from the existing one. It will need a different hostname, IPv4 address(es), IPv6 address(es), possible different DNS Server allocations, or a different Active Directory site.
Microsoft provides a way to supply this information through the DCCloneConfig.xml file. Again, after cloning, the domain controller you intend to clone will pick up this file when you store it on removable media or in the same path as the Active Directory database.
If no DCCloneConfig.xml file is supplied, the new domain controller will boot into Directory Services Restore Mode.
If an empty DCCloneConfig.xml file is supplied, the new domain controller will be assigned the following:
- IP addresses through DHCP
- An automatically assigned hostname
- The same Active Directory site as the source domain controller
If a specific hostname, Active Directory site, or IP address is needed, take a look at the parameters you can specify for New-ADDCCloningConfig, such as the -SiteName, -CloneComputerName, and -Static -IPv4Address parameters.
A sample PowerShell one-liner to create a new domain controller with the name DC04 in the Active Directory site named RemoteLocation with the correct IPv4 information would look like the following code:
New-ADDCCloneConfigFile -CloneComputerName "DC04" -SiteName RemoteLocation -Static -IPv4Address "10.0.1.3" -IPv4SubnetMask "255.255.255.0" -IPv4DefaultGateway "10.0.1.1" -IPv4DNSResolver "10.0.0.2"