Initialize-AzRecoveryServicesDSMove
Initializes DS move for Copy-AzRecoveryServicesVault.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
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
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The source vault object to trigger data move.
| Type: | ARSVault |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The target vault object where the data has to be moved.
| Type: | ARSVault |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |