Test-AzRecoveryServicesDSMove
This cmdlet performs necessary validations for DS Move.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Test-AzRecoveryServicesDSMove
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-SourceVault] <ARSVault>
[-TargetVault] <ARSVault>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet performs necessary validations for DS Move. This cmdlet generates a boolean true if all validations pass successfully. It is mandatory to run this cmdlet before Initialize-AzRecoveryServicesDSMove 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 |
Forces the data move operation (prevents confirmation dialog). This parameter is optional.
| 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 |