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 results in 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 will apply the 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
Indicates that the cmdlet generates output. By default, this cmdlet does not generate output. You can use the PassThru parameter in order to use the cmdlet in a pipeline.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ProtectionGroup<ProtectionGroup>
Specifies a ProtectionGroup object. 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
Notes
- For more information, type "
Get-Help Set-DPMReplicaCreationMethod -detailed
".
Examples
Example 1: Set the replica creation method
This example sets the replica creation method for a protection group.
The first command gets the protection group on the DPM server named DPMServer02 and stores the results in the $Pg variable.
The second command makes the protection group stored in the $Pg variable modifiable, and stores the result in the $Mpg variable.
The third command sets the replica creation method to Later for the protection group stored in the $Mpg variable to create a replica on April 23, 2013.
The fourth command uses the Set-DPMProtectionGroup cmdlet to save the action that you performed on the protection group stored in the $Mpg variable.
PS C:\> $Pg = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $Mpg = Get-DPMModifiableProtectionGroup -ProtectionGroup $Pg
PS C:\> Set-DPMReplicaCreationMethod -ProtectionGroup $Mpg -Later "23 April 2013"
PS C:\> Set-DPMProtectionGroup $Mpg