Creates a connection between members of a replication group.
PowerShell · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft DFSR reference: Creates a connection between members of a replication group. 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 Add-DfsrConnection. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / DFSR · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
-CreateOneWay
Specifies that the DFSR service does not create a matching connection in the opposite direction between the two computers. You do not typically need to specify this parameter. DFS Replication requires a fully-connected replication topology, which means that all servers have both an inbound and outbound connection between each of its direct partners, or through transitive replication. This is required even when you specify read-only replication by using the Set-DfsrMembership cmdlet and setting the *ReadOnly* parameter to $True.
-Description
Specifies a description for the connection.
-DestinationComputerName (required)
Specifies the name of the receiving computer. A receiving computer is also called an inbound or downstream computer.
-DisableConnection
Specifies that the DFSR service disables the connection. You do not typically need to disable a connection. Specify this parameter to temporarily pause replication. You can also use the Suspend-DfsReplicationGroup cmdlet to halt replication between computers. You must enable a connection between the computers before the DFS Replication service can initiate replication. Important: Specify this parameter instead of disabling a computer's membership in the replication group by using the Set-DfsrMembership cmdlet. Disabling and enabling a computer's membership will cause non-authoritative inbound replication.
-DisableCrossFileRDC
Indicates that the DFSR service disables the cross-file similarity Remote Differential Compression (RDC) algorithm on this connection. Cross-file RDC uses up to five existing previously replicated files on a volume to seed a new replicating file. Applying cross-file RDC over very low-bandwidth network connections with files that are very similar results in very large bandwidth savings and potentially large time savings. When you use cross-file RDC on very high-bandwidth network connections, cross-file RDC may add too much local processing time and negatively affect performance. In extremely large datasets (millions of files on a volume with a great deal of similarity), cross-file RDC may also negatively affect CPU and disk utilization. Consider disabling cross-file RDC during initial synchronization when you replicate over LANs and very high performance WANs. This setting is only supported on Windows Server 2012 R2 and later.
-DisableRDC
Indicates that the DFS Replication service creates the connection with Remote Differential Compression (RDC) disabled. You do not typically need to specify this parameter when you use lower bandwidth, higher latency connections. Consider specifying this parameter if the connection is over a LAN or very high performance WAN connection. By default, RDC is enabled on DFS Replication connections.
-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.
-GroupName (required)
Specifies an array of names of replication groups. You can use a comma separated list and the wildcard character (*).
-MinimumRDCFileSizeInKB
Specifies the file size threshold, in kilobytes, for RDC to apply. You do not typically need to specify this parameter when you use lower bandwidth/higher latency connections. Consider specifying this parameter only if the connection is over a LAN or a very high performance WAN connection. By default, any files equal to or greater than 64KB are chunked by RDC.
-SourceComputerName (required)
Specifies the name of the sending computer. A sending computer is also called an outbound or upstream computer.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
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.
Security considerations
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.
Examples
Example 1: Create a bidirectional connection between members of a replication group
This command creates a bidirectional replication connection between the computer named SRV01 and the computer named SRV02 in the replication group named RG24. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.