Edit

Share via


Initialize-AzRecoveryServicesDSMove

Initializes DS move for Copy-AzRecoveryServicesVault.

Syntax

Default (Default)

Initialize-AzRecoveryServicesDSMove
    [-DefaultProfile <IAzureContextContainer>]
    [-SourceVault] <ARSVault>
    [-TargetVault] <ARSVault>
    [-RetryOnlyFailed]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Initializes DS move for Copy-AzRecoveryServicesVault. It is mandatory to run Test-AzRecoveryServicesDSMove cmdlet before this cmdlet. This cmdlet generates a Correlation Id which can be used as Input to Copy-AzRecoveryServicesVault cmdlet. This cmdlet is useful for cross tenant DS move scenario.

Examples

Example 1: Initialize DS Move for cross subscription copy

Set-AzContext -SubscriptionName $targetSubscription
$validated = Test-AzRecoveryServicesDSMove -SourceVault $srcVault -TargetVault $trgVault -Force
Set-AzContext -SubscriptionName $sourceSubscription
if($validated) {
  $corr = Initialize-AzRecoveryServicesDSMove  -SourceVault $srcVault -TargetVault $trgVault
 }

First cmdlet sets target subscription context. Second cmdlet triggers some mandatory validations on target vault. Third cmdlet sets source subscription context. Then based on Test-AzRecoveryServicesDSMove cmdlet state, we fetch CorrelationId using Initialize-AzRecoveryServicesDSMove cmdlet. $corr can be input to the Copy cmdlet.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

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

-RetryOnlyFailed

Switch parameter to try data move only for containers in the source vault which are not yet moved.

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

-SourceVault

The source vault object to trigger data move.

Parameter properties

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

Parameter sets

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

-TargetVault

The target vault object where the data has to be moved.

Parameter properties

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

Parameter sets

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

-WhatIf

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

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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.

Inputs

ARSVault

Outputs

String