Condividi tramite


Set-DPMReplicaCreationMethod

Set-DPMReplicaCreationMethod

Sets the replica creation method for disk-based protection.

Syntax

Parameter Set: Now
Set-DPMReplicaCreationMethod [-ProtectionGroup] <ProtectionGroup> -Now [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Later
Set-DPMReplicaCreationMethod [-ProtectionGroup] <ProtectionGroup> -Later <DateTime> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Manual
Set-DPMReplicaCreationMethod [-ProtectionGroup] <ProtectionGroup> -Manual [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed 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 2012 – 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.

Parameters

-Later<DateTime>

Specifies the time at which DPM performs the operation.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Manual

Indicates that you apply settings manually.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Now

Indicates that DPM creates the replica immediately.

Aliases

none

Required?

true

Position?

named

Default Value

none

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProtectionGroup<ProtectionGroup>

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

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • ProtectionGroup

Examples

Example 1: Set the replica creation method

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.

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 

Get-DPMProtectionGroup

Get-DPMModifiableProtectionGroup

Get-DPMReplicaCreationMethod

Set-DPMProtectionType