DFS Namespaces (Distributed File System Namespaces) lets you present multiple shared folders from different servers under a single unified path — for example \\company\shared instead of \\server1\data and \\server2\archive. Users see one consistent location regardless of which physical server holds the data. This guide covers installing DFS, creating a namespace, adding folders, and understanding replication.
Why Use DFS Namespaces
Without DFS, moving a file share to a new server breaks every shortcut and mapped drive pointing to the old server name. With DFS, you update the namespace target and users are transparently redirected — the path they access never changes.
DFS also supports multiple targets for the same folder, which combined with DFS Replication provides load balancing and redundancy.
Installing DFS Namespaces
Install via PowerShell:
Install-WindowsFeature FS-DFS-Namespace, FS-DFS-Replication, RSAT-DFS-Mgmt-Con
Or via Server Manager: Add Roles and Features → File and Storage Services → File and iSCSI Services → DFS Namespaces and DFS Replication.
Open DFS Management from Administrative Tools after installation.
Namespace Types
There are two types:
- Domain-based namespace — stored in Active Directory, path is
\\domain.com\namespace. Supports multiple namespace servers for redundancy. This is the recommended type for most environments. - Stand-alone namespace — stored on the namespace server itself, path is
\\servername\namespace. No AD required, but no redundancy — if the server fails, the namespace is unavailable.
Creating a Domain-Based Namespace
- In DFS Management, right-click Namespaces → New Namespace
- Enter the server name that will host the namespace
- Enter a namespace name (e.g.
Shared) — the full path becomes\\company.local\Shared - Select Domain-based namespace
- Review the settings and click Create
PowerShell equivalent:
New-DfsnRoot -Path "\\company.local\Shared" -Type DomainV2 -TargetPath "\\Server1\Shared"
This creates a share called Shared on Server1 and registers the namespace in AD.
Adding Folders to the Namespace
Each DFS folder maps a virtual path to one or more physical share targets.
- Right-click your namespace → New Folder
- Name the folder (e.g.
Finance) - Click Add and enter the target share path (e.g.
\\FileServer01\Finance) - Click OK
Users can now access \\company.local\Shared\Finance and will be directed to \\FileServer01\Finance.
PowerShell:
New-DfsnFolder -Path "\\company.local\Shared\Finance" -TargetPath "\\FileServer01\Finance"
Adding a Second Target for Redundancy
Add a second target to the same folder for failover:
- Right-click the folder → Add Folder Target
- Enter the second share path (e.g.
\\FileServer02\Finance)
DFS will direct clients to the closest available target. If one server is unreachable, clients fail over to the other automatically.
For the targets to stay in sync, configure DFS Replication between them (see below).
DFS Replication
DFS Namespaces is about the virtual path — DFS Replication (DFSR) is a separate feature that actually copies data between servers. They are complementary but independent.
To set up replication between two targets:
- In DFS Management, right-click Replication → New Replication Group
- Choose Multipurpose replication group
- Add the servers that will replicate
- Choose the folders to replicate and set the primary member (which has the authoritative copy)
- Set the replication schedule (full-time or specific hours)
- Set bandwidth throttle if needed
DFSR uses a compressed, delta-based algorithm — only changed blocks are transferred after the initial sync.
Checking Replication Health
From PowerShell on any member server:
# Check replication group state
Get-DfsrMember -GroupName "Finance-RG" | Select ComputerName, State
# Get backlog (files waiting to replicate)
Get-DfsrBacklog -GroupName "Finance-RG" -FolderName "Finance" -SourceComputerName Server1 -DestinationComputerName Server2 | Measure-Object
A zero backlog means both servers are in sync.
Referrals and Client Caching
When a client accesses a DFS path, it queries the namespace server for a referral — the list of targets for that folder. The client caches this referral (default 1800 seconds). You can adjust the cache time per namespace or per folder:
Set-DfsnFolder -Path "\\company.local\Shared\Finance" -TimeToLiveSec 300
Shorter TTL means clients pick up target changes faster but generate more referral queries.