Editar

Partilhar via


Initialize-AzRecoveryServicesDSMove

Initializes DS move for Copy-AzRecoveryServicesVault.

Syntax

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.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RetryOnlyFailed

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

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

-SourceVault

The source vault object to trigger data move.

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

-TargetVault

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

Type:ARSVault
Position:2
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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ARSVault

Outputs

String