Before setting up DFS Replication, you need to have an Active Directory controller set up and DFS (which I will touch on in this guide to setting up DFS Replication). To set up DFS Replication (DFSR) on Windows Server 2012 R2, you need to do the following:
Install the DFS Namespaces and DFS Replication server roles, which are listed under the File and Storage Services -> File and iSCSI Services roles. Add any associated role features that you are prompted to install
Next lauch DFS Management from the start menu (It’s an MMC add in)
First add a namespace, if you don’t already have one. If you already have one, right click Namespaces and add a Namespace to display
Select the Namespace you want to replicate, then click Add Namespace Server to add the current server you want to set up replication on
Enter the name of the namespace server and click Edit Settings to set the path and permissions for the DFS folder to be held on the server you specified. This will set up the network share of this folder, but not the NTFS permissions on the folder.
Set up NTFS permissions as required on the folder you have specified to be your DFS namespace folder
Right click Replication and click New Replication Group
Go through the wizard to set up the replication group
Once AD replicates, DFS Replication will be set up.
❗ Note: The first replication always takes a while.