Set-DPMReplicaCreationMethod

Sets the replica creation method for disk-based protection.

Syntax

Set-DPMReplicaCreationMethod
   [-ProtectionGroup] <ProtectionGroup>
   [-Now]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMReplicaCreationMethod
   [-ProtectionGroup] <ProtectionGroup>
   -Later <DateTime>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMReplicaCreationMethod
   [-ProtectionGroup] <ProtectionGroup>
   [-Manual]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-DPMReplicaCreationMethod cmdlet sets the replica creation method for disk-based protection. You can set Now, Later, and Manual as the replica creation method. If you do not specify a value, the default replica creation method is Now.

If you specify Now for disk, System Center - Data Protection Manager (DPM) starts replication as soon as you create the protection group.

The Set-DPMReplicaCreationMethod cmdlet is the second step in changing the replication method that you specified for a protection group. You must first get the replica creation method by using the Get-DPMReplicaCreationMethod cmdlet.

You can use this cmdlet to set the replica creation method only if you set the protection type to short-term for disk and long-term for online. You can use the Set-DPMProtectionType to set the protection type for a protection group. If you specify any other type of protection type, this cmdlet returns an error. This cmdlet does not apply to tape-based protection.

Examples

Example 1: Set the replica creation method

PS C:\>$PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-DPMModifiableProtectionGroup -ProtectionGroup $PGroup
PS C:\> Set-DPMReplicaCreationMethod -ProtectionGroup $MPGroup -Later "23 April 2013"
PS C:\> Set-DPMProtectionGroup -ProtectionGroup $MPGroup

The first command gets the protection group on the DPM server named DPMServer02, and then stores it in the $PGroup variable.

The second command makes the protection group in $PGroup modifiable, and stores the result in the $MPGroup variable.

The third command sets the replica creation method to Later for the protection group in $MPGroup to create a replica on April 23, 2013.

The fourth command uses the Set-DPMProtectionGroup cmdlet to save your changes.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Later

Specifies the time at which DPM performs the operation.

Type:DateTime
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Manual

Indicates that you apply settings manually.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Now

Indicates that DPM creates the replica immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProtectionGroup

Specifies a protection group for which this cmdlet sets the replica creation method. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.

Type:ProtectionGroup
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ProtectionGroup