Edit the Replication Filters for a Replicated Folder
Updated: October 16, 2013
Applies To: Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2
You can configure file and subfolder filters to prevent files and subfolders from replicating. Both types of filters are set on a per-replicated folder basis. You exclude subfolders by specifying their name or by using the asterisk (*) wildcard character. You exclude files by specifying their name or by using the asterisk (*) wildcard character to specify file names and extensions.
By default, no subfolders are excluded. The default file filters exclude the following files from replication:
File names starting with a tilde (~) character
Files with .bak or .tmp extensions
Regardless of which filters are set, the following types of files are always excluded from replication:
NTFS volume mount points
Files that are encrypted by using the encrypting file system (EFS)
Any reparse points except those associated with DFS Namespaces
(If a file has a reparse point that is used for Hierarchical Storage Management (HSM) or Single Instance Store (SIS), DFS Replication replicates the underlying file but not the reparse point.)
Files on which the temporary attribute has been set
To edit the replication filters by using Windows PowerShell, use the Set-DfsrReplicatedFolder cmdlet, which was introduced in Windows Server 2012 R2.
To edit the replication filters for a replicated folder
Click Start , point to Administrative Tools , and then click DFS Management .
In the console tree, under the Replication node, click the replication group that contains the replicated folder with the filters that you want to edit.
In the details pane, on the Replicated Folders tab, right-click a replicated folder, and then click Properties .
On the General tab, edit the existing filters or add new filters, paying attention to the following restrictions:
You cannot create file or subfolder filters by specifying a full path, such as C:\Replicatedfolder\Temp or C:\Replicatedfolder\file.dat.
You cannot use a comma in a filter because commas are used as delimiters.
After a member detects a new filter, the member scans its database and removes the file records of files that match the filter. Because the files are no longer listed in the database, future changes to the files are ignored.
After a member detects that a filter has been removed, the member scans the file system, adds records for all files that match the removed filter, and replicates the files.
Configuration changes are not applied immediately to all members except when using the Suspend-DfsReplicationGroup and Sync-DfsReplicationGroup cmdlets. The new configuration must be replicated to all domain controllers, and each member in the replication group must poll its closest domain controller to obtain the changes. The amount of time this takes depends on AD DS replication latency and the long polling interval (60 minutes) on each member. To poll immediately for configuration changes, open a command prompt window and then type the following command once for each member of the replication group:
dfsrdiag.exe PollAD /Member:DOMAIN\Server1. To do so from a Windows PowerShell session, use the
Update-DfsrConfigurationFromAD cmdlet, which was introduced on Windows Server 2012 R2.