Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.
Know what DFS Replication can and cannot synchronize
DFS Replication synchronizes supported file data between Windows servers using a replication group, replicated folders, memberships and connections. It is useful for distributed file-service scenarios where changes can converge asynchronously. It does not provide a shared file lock across servers or transactional consistency for a live application database. Users editing the same file on different members can create conflicts, so access and application behaviour must match the replication model.
This example creates a two-member group for ordinary Finance documents on FS01 and FS02 in one AD environment. It does not publish the second server through DFS Namespaces until synchronization and permissions have been verified. Replication is also not backup: deletion, unwanted changes and some forms of corruption can propagate. Maintain independent recovery points and an incident procedure that can isolate replication when necessary.
Prepare both copies and choose the initial authority
Verify domain membership, DNS, time, AD replication and administrative connectivity. Use supported NTFS data volumes and install current updates. Confirm the workload is supported for DFSR; do not use this procedure for live SQL Server databases, active Hyper-V virtual disks, Cluster Shared Volumes or other application data requiring an unsupported replication model. File-level synchronization is not an application-aware availability feature.
Back up both servers’ existing content before enabling a relationship. Identify one authoritative initial source and reconcile discrepancies before setup. In this guide FS01 is the initial primary member; the designation applies to initialization, not a permanent master. A populated FS02 folder can contain different data and must not be assumed harmless. For large datasets, use a documented pre-seeding process that preserves required metadata and verify it before replication begins.
Size staging space for the actual file population and change rate. A default quota may be inadequate for large files. Plan bandwidth, schedule, backlog monitoring, antivirus compatibility and sufficient free space on both members. Keep users writing to the designated source during the controlled initialization window according to the migration plan.
Install DFSR and create the group objects
Run the feature installation on each member and verify the DFSR service. Execute configuration commands from a server with the DFSR management module and sufficient delegated AD permissions. The examples create new objects; inspect existing configuration before rerunning them. A duplicate-name error should prompt review, not deletion of the old group.
# Run on each member:
Install-WindowsFeature FS-DFS-Replication,RSAT-DFS-Mgmt-Con
Get-Service DFSR
# Run once from the administration session:
New-DfsReplicationGroup -GroupName 'Finance Data'
Add-DfsrMember -GroupName 'Finance Data' -ComputerName 'FS01','FS02'
New-DfsReplicatedFolder -GroupName 'Finance Data' -FolderName 'Finance'The group and replicated-folder names are logical DFSR objects, not automatic SMB shares or namespace folders. Creating them does not grant users access. Ensure the intended local directories exist and have reviewed ACLs, with no unsupported reparse-point or application layout hidden inside them.
Create the topology and map local paths
Add-DfsrConnection creates the matching reverse connection by default. Therefore one command is sufficient for a normal bidirectional pair; a second reversed command is not required. Use CreateOneWay only when a specifically supported design calls for it, and understand that a one-way connection is not a substitute for a read-only access design.
Add-DfsrConnection -GroupName 'Finance Data' `
-SourceComputerName 'FS01' -DestinationComputerName 'FS02'
Set-DfsrMembership -GroupName 'Finance Data' -FolderName 'Finance' `
-ComputerName 'FS01' -ContentPath 'D:\Shares\Finance' `
-PrimaryMember $true -StagingPathQuotaInMB 16384 -Force
Set-DfsrMembership -GroupName 'Finance Data' -FolderName 'Finance' `
-ComputerName 'FS02' -ContentPath 'D:\Shares\Finance' `
-StagingPathQuotaInMB 16384 -ForceThe 16 GB staging quota is illustrative, not a universal recommendation. Choose it from the largest files, simultaneous activity and available capacity. Force suppresses confirmation, so run these only after reviewing the member and path mapping. The two paths need not have identical drive letters, but they must point to the intended content on each computer.
Allow configuration to arrive and observe initialization
DFSR configuration is stored in AD and members learn it through directory replication and polling. Do not assume a just-created membership is instantly active everywhere. Where appropriate, request a configuration poll and then inspect the DFS Replication event log on both servers. Identify initialization and successful completion evidence for the specific replicated folder rather than relying only on the service being Running.
Update-DfsrConfigurationFromAD -ComputerName 'FS01','FS02'
Get-DfsrConnection -GroupName 'Finance Data'
Get-DfsrMembership -GroupName 'Finance Data' -FolderName 'Finance'
Get-WinEvent -LogName 'DFS Replication' -MaxEvents 40Keep the secondary data target out of user referrals until the folder has completed initial synchronization. A slow first transfer is not necessarily a fault; its duration depends on data volume, available bandwidth, file churn and staging. Record timestamps, states and backlog trends so you can distinguish progress from a stalled membership. Avoid restarting services repeatedly because doing so can obscure the event sequence without solving the cause.
Verify convergence in both directions
Query backlog from FS01 to FS02 and from FS02 to FS01. The direction matters: one empty queue does not prove the opposite direction is healthy. A zero or empty backlog is useful evidence at a point in time, but it is not proof that every historical file is correct or that future changes will replicate.
Get-DfsrBacklog -GroupName 'Finance Data' -FolderName 'Finance' `
-SourceComputerName 'FS01' -DestinationComputerName 'FS02' -Verbose
Get-DfsrBacklog -GroupName 'Finance Data' -FolderName 'Finance' `
-SourceComputerName 'FS02' -DestinationComputerName 'FS01' -VerboseAfter initial synchronization completes, create a disposable uniquely named file on the permitted source, wait for it to arrive, compare content or hash, and confirm deletion propagation. If the design permits writes on both members, perform a distinct test in the reverse direction. Check ACL behaviour and real user access separately. Do not test concurrent editing of important documents to demonstrate a conflict. Keep test artifacts identifiable and remove them when verification is complete.
Diagnose backlog and conflicts with evidence
For a growing backlog, check whether files remain open, the replication schedule is closed, staging is too small, disk space is low or connectivity is interrupted. Inspect DFSR events and AD health before manipulating the replication database. Also compare the application’s rate of change with the capacity of the link: a relationship can be healthy but unable to catch up under sustained load.
Investigate conflict and deleted-content handling promptly. Do not treat the hidden DFSR working directories as an ordinary user restore area or manually remove their contents to reclaim space. If content freshness protection or a database recovery condition stops a member, follow the documented recovery procedure for that exact event. Deleting the DFSR database, changing authoritative flags or copying old files into place without a recovery plan can spread the wrong data.
Rollback and recovery require a data decision
If a newly configured relationship uses the wrong path or authority, stop the rollout and isolate the affected membership through a reviewed change. Preserve both copies, configuration and event evidence before removing objects. Removing a replication group does not determine which data is correct and does not undo propagated deletions. Restore needed content from an independent backup after deciding how to prevent immediate unwanted replication.
Document who may change topology, the expected backlog envelope, staging capacity and the response to prolonged failure. Review the relationship after data growth and application changes. Publish additional DFS namespace targets only when they contain verified data and the user write model is appropriate. The operational goal is predictable convergence with recoverable mistakes, not merely two servers that both display a green service icon.
Related guidance and official references
Create a DFS namespace; Design file permissions; Create a full server backup.