COMMAND EVERYTHING.
Modifies a replication partnership between two replication groups.
Microsoft StorageReplica reference: Modifies a replication partnership between two replication groups. 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-SRPartnership. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / StorageReplica · Windows Server 2025 documentation; feature/module prerequisites apply
-AsJob- Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
-AsyncRPO- Specifies the maximum difference in time that data for an asynchronous partnership can be different between source and destination. This is a Recovery Point Objective. The default value is 30 seconds. After this time is exceeded, the source server alerts the Health Service on clusters. It logs event 1239 in the Storage Replica Admin event log channel. If the RPO time is lower than the configured time, event 1240 is logged. Changing this value modifies monitoring and logging. It does not affect replication or Input/Output.
-CimSession- Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
-Compression- Indicates that the connections in this partnership should use SMB compression for data transfer. SMB compression is only used with TCP, and isn't supported on both SMB Direct and RDMA networks.
-Confirm- Prompts you for confirmation before running the cmdlet.
-DestinationAddVolumePartnership (required)- Specifies an array of drive letters or mount point paths of partitions to add to the existing replication group. You cannot specify paths already added to the replication group. This list is ordered. The order of volumes determines the order of replication. For more information, see the DestinationVolumeName parameter of the New-SRPartnership cmdlet. We do not recommend replicating different drive letters or mount point paths. The practice can cause application failures because of stored settings after a failover occurs.
-DestinationComputerName (required)- Specifies a single replica host computer NetBIOS name or fully qualified domain name (FQDN) of the destination computer.
-DestinationRGName (required)- Specifies the name of the destination replication group.
-Encryption- Indicates that the connections on this partnership should be encrypted by using SMB AES-128-GCM. Enabling encryption can protect Storage Replica block transfers from man-in-the-middle interception or reading. Enabling encryption can decrease replication and write Input/Output performance.
-Force- Forces the command to run without asking for user confirmation.
-LogSizeInBytes- Specifies the aggregate size of log files on each server in the replication group for the volumes that are associated with this replication group. The minimum size 512MB. You can specify a value by using the Windows PowerShell byte conversion capability, such as 4GB or 3200MB. A value that is too small may cause decreased replication performance or increased recovery time after an interruption between computers.
-NewSourceComputerName- Specifies the new source of replication. This parameter changes the direction of replication for the source computer and the source replication group. When changed, replication stops originating on the current source and moves to the new source. This operation is very likely to disrupt access to data. There is a time when neither volumes are writable and when clients and applications might still access the previously writable source volume. You may also have to reconfigure applications and repoint users to this new location, using technologies such as DFS Namespaces. When switching asynchronously-replicated volumes, to avoid data loss, you must first make sure that user and application data is quiescent.
-ReplicationMode- Specifies the desired mode of replication for this source and destination pair. The acceptable values for this parameter are: - Synchronous or 1. The synchronous mode requires all writes to commit on the destination server and commit on the source server, which guarantees data integrity between computers. - Asynchronous or 2. The asynchronous mode writes to the source server without waiting for the server, which allows for replication over high latency, geographic networks. The default value is synchronous. The default asynchronous recovery point alert time is 30 seconds. You can modify it by using this cmdlet. The alert time has no effect on replication behavior, only on reporting.
-Seeded- Indicates that the destination server contains a seeded copy of the data from the source server. Seeded data is defined as a copy of data from the source server that has a high similarity, such as mostly empty blocks, restoring a recent backup, or shipping cloned copies of disks to the destination server. Seeding is most effective when using a previous copy of the storage, such as a split mirror or previously replicated drives, or when the storage is mostly empty and was always empty, such as a recently initialized drive with a newly formatted volume. Seeding is somewhat effective with data that came from a backup restore or a complete tree copy of data or from copies of very large files. Seeding is least effective when copying many small files from some random locations to some other random locations. Storage Replica automatically uses seeding when it restarts replication after a long outage that wrapped the logs.
-SourceAddVolumePartnership (required)- Specifies an array of drive letters or mount point paths of partitions to add to the existing replication group. You cannot specify paths already added to the replication group. This is an ordered list. The order of volumes determines the order of replication. For more information, see the DestinationVolumeName parameter of the New-SRPartnership cmdlet.
-SourceComputerName- Specifies a single replica host computer NetBIOS name or FQDN of the source computer. The default value is the local computer.
-SourceRGName (required)- Specifies the name of the source replication group.
-ThrottleLimit- Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet is not run.
Windows with the StorageReplica 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.