Introduction to Distributed File System on Windows Server 2019
Distributed File System (DFS) in Windows Server 2019 provides two complementary technologies: DFS Namespaces and DFS Replication. DFS Namespaces allows you to group shared folders located on different servers into one or more logically structured namespaces, giving users a unified virtual path such as \domainshared that transparently points to physical shares on multiple servers. DFS Replication (DFSR) is a multi-master replication engine that keeps folders synchronised across multiple servers using a compressed, bandwidth-throttled protocol, making it ideal for branch office file server scenarios and file distribution across sites.
Together these features enable high availability of file shares, load distribution, and cross-site data synchronisation. Windows Server 2019 includes improvements to DFSR database recovery, compression algorithms, and logging compared to earlier versions.
Installing DFS Roles and Features
Install both DFS Namespaces and DFS Replication role services using PowerShell:
Install-WindowsFeature -Name FS-DFS-Namespace, FS-DFS-Replication -IncludeManagementTools
This also installs the DFS Management console (dfsmgmt.msc). Verify the installation:
Get-WindowsFeature -Name FS-DFS-*
The DFS Replication service (DFSR) should start automatically. Check it:
Get-Service -Name DFSR
Creating a Domain-Based DFS Namespace
A domain-based namespace is stored in Active Directory and is highly available — multiple namespace servers can host the same namespace. Create the namespace root on the first server:
New-DfsnRoot -Path "\contoso.comshared" -TargetPath "\FileServer01SharedRoot" -Type DomainV2 -Description "Corporate File Share Namespace"
DomainV2 is the Windows Server 2008-mode namespace which supports access-based enumeration and improved scalability. Add a second namespace server for redundancy:
New-DfsnRootTarget -Path "\contoso.comshared" -TargetPath "\FileServer02SharedRoot"
Both namespace servers now serve the namespace. If one goes offline, clients automatically fail over to the remaining server.
Adding DFS Namespace Folders and Targets
Namespace folders are virtual directories under the namespace root that point to physical share targets. Create a folder for the HR department:
New-DfsnFolder -Path "\contoso.comsharedHR" -TargetPath "\FileServer01HR" -Description "Human Resources Files"
Add a second target for the same folder on another server (for redundancy or load sharing):
New-DfsnFolderTarget -Path "\contoso.comsharedHR" -TargetPath "\FileServer02HR"
Configure referral ordering to control which target clients access first. For an Active Directory site-aware deployment:
Set-DfsnFolder -Path "\contoso.comsharedHR" -ReferralPriorityClass SiteCostLow
Setting Up DFS Replication Groups
DFS Replication keeps target folders in sync. Create a replication group for the HR folder between two servers:
New-DfsReplicationGroup -GroupName "HR Replication" -Description "Replicates HR folder between FileServer01 and FileServer02" -DomainName "contoso.com"
Add replicated folder to the group:
New-DfsReplicatedFolder -GroupName "HR Replication" -FolderName "HR" -DomainName "contoso.com"
Add the members (servers) to the replication group:
Add-DfsrMember -GroupName "HR Replication" -ComputerName "FileServer01" -DomainName "contoso.com"
Add-DfsrMember -GroupName "HR Replication" -ComputerName "FileServer02" -DomainName "contoso.com"
Set the local folder paths on each member:
Set-DfsrMembership -GroupName "HR Replication" -FolderName "HR" -ComputerName "FileServer01" -ContentPath "D:SharesHR" -PrimaryMember $true -DomainName "contoso.com"
Set-DfsrMembership -GroupName "HR Replication" -FolderName "HR" -ComputerName "FileServer02" -ContentPath "D:SharesHR" -PrimaryMember $false -DomainName "contoso.com"
Configuring Replication Connections and Schedule
Create the replication connection between members:
Add-DfsrConnection -GroupName "HR Replication" -SourceComputerName "FileServer01" -DestinationComputerName "FileServer02" -DomainName "contoso.com"
Configure bandwidth throttling for WAN links (useful for branch office replication). Limit bandwidth to 512 Kbps during business hours:
Set-DfsrConnectionSchedule -GroupName "HR Replication" -SourceComputerName "FileServer01" -DestinationComputerName "FileServer02" -UseUTC $false -ScheduleType UseFullBandwidthAlways -DomainName "contoso.com"
After configuration, force initial replication synchronisation:
Update-DfsrConfigurationFromAD -DomainName "contoso.com" -ComputerName "FileServer01"
Update-DfsrConfigurationFromAD -DomainName "contoso.com" -ComputerName "FileServer02"
Monitoring DFS Replication Health
Check replication backlog between members:
Get-DfsrBacklog -GroupName "HR Replication" -FolderName "HR" -SourceComputerName "FileServer01" -DestinationComputerName "FileServer02" -DomainName "contoso.com"
View replication state and member status:
Get-DfsrState -GroupName "HR Replication" -ComputerName "FileServer01" -DomainName "contoso.com"
Generate a health report using the DFS Management GUI (dfsmgmt.msc) by right-clicking the replication group and selecting Create Diagnostic Report. This HTML report shows replication efficiency, error counts, and bandwidth usage over the selected period. DFS is a cornerstone technology for file service high availability and branch office data access in enterprise Windows Server 2019 environments.