Editar

Compartir a través de


Test-AzRecoveryServicesDSMove

This cmdlet performs necessary validations for DS Move.

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

-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

-Force

Forces the data move operation (prevents confirmation dialog). This parameter is optional.

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

Boolean