Edit

Share via


New-SRGroup

Creates a replication group.

Syntax

Default (Default)

New-SRGroup
    [[-ComputerName] <String>]
    [-Name] <String>
    [-VolumeName] <String[]>
    [-LogVolumeName] <String>
    [[-LogSizeInBytes] <UInt64>]
    [[-Description] <String>]
    [-EnableConsistencyGroups]
    [-EnableEncryption]
    [-EnableCompression]
    [-Force]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

Description

The New-SRGroup cmdlet creates a replication group. A replication group contains one or more data volumes and an associated log volume. A replication group is the container for replication.

Examples

Example 1: Create a replication group

New-SRGroup -ComputerName "SR-SRV05" -Name "ReplicationGroup01" -VolumeName "D:" -LogVolumeName "E:"

This command creates a replication group for server named SR-SRV05. The command specifies the replicated volume and the log volume. Because this command does not specify other parameters, the replication group uses default values. Replication will not start until you run the New-SRPartnership cmdlet.

Example 2: Create a replication group that uses custom properties

$Parameters = @{
    ComputerName = 'SR-SRV05'
    Name = 'ReplicationGroup02'
    VolumeName = 'D:'
    LogVolumeName = 'E:'
    LogSizeInBytes = '32GB'
    EnableEncryption = $True
}
New-SRGroup @Parameters

This command creates a replication group for server named SR-SRV05. The command specifies the replicated volume and the log volume. The command also specifies a custom log size in GB and enables replication traffic encryption. Replication will not start until you run New-SRPartnership.

This example uses splatting to pass parameter values from the $Parameters variable to the command. Learn more about Splatting.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies a single replica host computer NetBIOS name or fully qualified domain name (FQDN) of a computer to belong to the replication group. The default value is the local computer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CN

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Description

Specifies a description for the replication group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:D

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableCompression

Indicates that this Storage Replica group 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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ECMP

Parameter sets

(All)
Position:9
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableConsistencyGroups

Indicates that consistency groups are enabled for the replication group that contains multiple volumes. Consistency groups provide write ordering. This can be important, for example, for replication of application data on multiple volumes.

If you enable consistency groups, it may decrease replication and write Input/Output performance.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EC

Parameter sets

(All)
Position:6
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableEncryption

Indicates that this partnership should encrypt connection by using SMB AES-128-GCM. Enabling encryption can protect Storage Replica block transfers from man-in-the-middle interception or reading. Enabling encryption decreases performance.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EE

Parameter sets

(All)
Position:7
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:F

Parameter sets

(All)
Position:100
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LS

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-LogVolumeName

Specifies a drive letter, mount point path, or volume GUID where Storage Replication creates destination replication logs. The value must contain an NTFS-formatted volume or ReFS-formatted volume. The path must exist. The path cannot be a mapped drive or UNC path.

Storage Replication creates logs in the System Volume Information folder.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LV

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

Specifies a name for the replication group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:N

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VolumeName

Specifies an array of drive letters or mount point paths for the replica. The volumes must exist. The volumes cannot be mapped drives or UNC paths.

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.

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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:VN

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

CimInstance