Setting a Primary DFS Member

Customers frequently ask about the “primary member” designation in DFS Replication. Although this sounds like it could be a single master setting (meaning that content only originates and changes on this member), the primary member is used only during  initial replication. Think of the primary member as your “look like me” member during initial replication. In other words, after initial replication is complete, all other replication group members will have the same content as the primary member. After the replicated folder is initialized (as reported by event 4002 , changes can originate on any member and will get the default fence value .

The primary member in DFS Replication

Steps for setting the primary member

Run in Admin PowerShell

  1. Determine your GroupName by getting all GroupNames with
    Get-DfsrMember | Select GroupName
    
  2. Find any existing primaries and more helpful info with
    Get-DfsrMembership -GroupName <groupname> | Select ComputerName,PrimaryMember,FolderName,GroupName
    
  3. Set a Primary with: (remove a primary with $false)
    Set-DfsrMembership -GroupName <groupname> -FolderName <foldername> -ComputerName <computername> -PrimaryMember $true