COMMAND EVERYTHING.
Configures membership settings for replication group members.
Microsoft DFSR reference: Configures membership settings for replication group members. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Set-DfsrMembership. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / DFSR · Windows Server 2025 documentation; feature/module prerequisites apply
-ComputerName (required)- Specifies an array of names of member computers. The cmdlet modifies membership settings for these member computers. You can use a comma separated list and the wildcard character (*).
-Confirm- Prompts you for confirmation before running the cmdlet.
-ConflictAndDeletedQuotaInMB- Specifies the maximum size, in megabytes, for the ConflictsAndDeleted folder. The default value is 4096 MB. When the size of this folder reaches a specified percent of the quota value, DFS Replication deletes the oldest files in the folder. The default value is 90 percent. DFS Replication continues to delete files until the size of the folder reaches a specified percent of the quota value. The default value is 60 percent. Use the Set-DfsrServiceConfiguration cmdlet to modify the percent values.
-ContentPath- Specifies a local folder to contain replicated files associated with the replicated folder specified by using the *FolderName* parameter.
-DfsnPath- Specifies the DFS Namespace folder path of the membership. You can use this value to keep track of the DFS Namespace folder path. This value does not affect replication.
-DisableMembership- Indicates whether to disable the membership for a replication folder in a replication group. If you disable membership, DFS Replication stops replicating content on this computer, but does not delete the replicated folder or its private replication data. If you re-enable membership, you will lose any private data and can lose replicated data. You may be able to recover replicated data by using the Restore-DfsrPreservedFiles cmdlet. By default, memberships are enabled. If you want to temporarily pause replication, disable the connections on the member by using the Set-DfsrConnection cmdlet or use the Suspend-DfsReplicationGroup cmdlet.
-DomainName- Specifies the NetBIOS name or fully qualified domain name (FQDN) for the Active Directory Domain Service (AD DS) domain that contains the replication group. If you do not specify this parameter, the cmdlet uses the domain of the current user.
-FolderName (required)- Specifies an array of names of replicated folders. If you do not specify this parameter, the cmdlet applies to all participating replicated folders. You can use a comma separated list and the wildcard character (*).
-Force- Forces the command to run without asking for user confirmation.
-GroupName (required)- Specifies an array of names of replication groups. If you do not specify this parameter, the cmdlet applies to all participating replication groups. You can use a comma separated list and the wildcard character (*).
-MinimumFileStagingSize- Specifies the minimum file size that DFS Replication stages during outbound replication. By default, this value is 256 KB. If you also disable Remote Differential Compression (RDC), files smaller than this size replicate without staging. On high-bandwidth, low-latency networks like LANs and high-speed WANs, this typically results in faster replication, at the cost of higher bandwidth saturation. You can use the Set-DfsrConnection cmdlet to disable or enable RDC. Windows Server® 2012 and previous versions of the Windows operating system do not support the file size setting. Previous versions of the Windows operating system that support DFS Replication use a hard-coded 256 KB minimum staging size. The acceptable values for this parameter are: - Size256KB (0) - Size512KB (1) - Size1MB (2) - Size2MB (3) - Size4MB (4) - Size8MB (5) - Size16MB (6) - Size32MB (7) - Size64MB (8) - Size128MB (9) - Size256MB (10) - Size512MB (11) - Size1GB (12) - Size2GB (13) - Size4GB (14) - Size8GB (15) - Size16GB (16) - Size32GB (17) - Size64GB (18) - Size128GB (19) - Size256GB (20) - Size512GB (21) - Size1TB (22) - Size2TB (23) - Size4TB (24) - Size8TB (25) - Size16TB (26) - Size32TB (27) - Size64TB (28) - Size128TB (29) - Size256TB (30) - Size512TB (31)
-PrimaryMember- Indicates whether this member computer is the primary member of a group. Specify one and only one membership in each replication group as primary. By default, members are not primary. If you specify a value of $True for this parameter, do not specify a value of $True for the *ReadOnly* parameter.
-ReadOnly- Indicates whether a replicated folder is read-only. By default, memberships are read/write. If you change a read/write folder to read-only or change a read-only folder to read/write, DFS Replication moves any local unreplicated changes to the ConflictAndDeleted folder. You may be able to restore these changes by using the Restore-DfsrPreservedFiles cmdlet. If you specify a value of $True for this parameter, do not specify a value of $True for the *PrimaryMember* parameter.
-RemoveDeletedFiles- Indicates whether the member computer deletes files and folders immediately following inbound replication. If this parameter has a value of $False, the member moves deleted files and folders to the ConflictAndDeleted folder when the deletion replicates inbound. The originating server always deletes files without preservation. You can use the Restore-DfsrPreservedFiles cmdlet to restore deleted files while they still exist in the ConflictAndDeleted folder. If this parameter has a value of $True, when a replicating member replicates a deletion, it deletes the local copy of the file immediately. If you do not specify this parameter, by default, DFS Replication preserves deleted files.
-StagingPath- Specifies a local folder for staging content. If you do not specify this parameter, DFS Replication creates a folder named \\DfsrPrivate\Staging.
-StagingPathQuotaInMB- Specifies the maximum size, in megabytes, of a staging folder. Memberships have a default value is 4096 MB. When the size of this folder reaches a specified percent, by default, 90, of the quota value, DFS Replication deletes the oldest files in the folder. DFS Replication continues to delete files until the size of the folder reaches a specified percent, by default, 60, of the quota value. Use the Set-DfsrServiceConfiguration cmdlet to modify the percent values. If you choose a larger quota, the member computer keeps staged data for longer periods, which provides better replication performance.
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet is not run.
Windows with the DFSR module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.