Reading Time: 4 minutes
Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

In Windows Server 2012 Microsoft introduced a new feature that allows us to clone domain controllers. This helps us sysadmins to quickly restore a domain controller in an event of failures (when we have one left) and it also helps us to deploy to test environments when needed.

Before Server 2012 you were able to clone domain controllers, but you were not able to deploy to the same domain without running sysprep. Running sysprep removes all security information meaning you would need to promote the domain controller manually. Not anymore! Now when you clone a Domain Controller it will do the sysprep and the promotion process automatically.

1. Log on to the Domain Controller you want to Clone using either a Domain Admin or Enterprise Admin account.

2. Go to Server Manager > Tools > Active Directory Users and Computers

clone01

3. Then go to the Domain Controllers OU. Select the DC we are cloning and right click and select Properties.

clone02

4. Go to the member of tab and click Add.

clone03

5. Then add the security group Cloneable Domain Controllers and click OK.

clone04

6. Open Powershell with admin rights and then type the following command. This will check the server to see if there are any programs that are not compatible with the cloning process.

7. If anything comes up in the list, make sure you remove them before the cloning process.

8. After you have removed any non-compatible programs type the following command.

In the above code I specify the ip address information it (the clone server) will hold. Also the computer name and site name.

clone

9. Once this has finished, close the powershell window and shutdown the server. (If you only have ONE DC, do this out of core hours.)

10. Open Hyper-V Manager and right click the DC that you are cloning and click Export. Select the path to save the exported VM to.

clone05

clone06

11. Once the export has completed, you can start the DC again.

12. Now we are ready to import the newly cloned DC. To do this in Hyper-V manager go to Action > Import Virtual Machine.

clone07

13. The import wizard will open and you can click Next to continue.

clone08

14. Specify the folder path to the exported DC and click Next.

clone09

15. Select the VM and then click Next.

clone10

16. Select Copy the virtual machine (create a new unique ID) and click Next.

clone11

17. Now you will get asked where you want to store the new VM. This is all based on your requirement, but once you have set what you want click Next.

clone12

18. Now set where you would like the storage folder to be. This is per your requirements again, but once you have set click Next.

clone13

19. Click Finish on the summary page. The import process will now start.

clone14

20. Once the import is complete. You can start the new DC.

21. The new DC will restart a few times as it goes through its automated process.

clone15

22. Once this has completed log in to the server as a Domain Admin. You should now see the new DC in the Domain Controllers OU and also under Sites and Services.

clone16

clone17

Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.