다음을 통해 공유


Update-AzureSiteRecoveryProtectionDirection

Site Recovery 개체의 보호를 위해 원본 및 대상 서버를 업데이트합니다.

참고

이 설명서에서 참조하는 cmdlet은 Service Management API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. Azure Resource Manager 리소스를 관리하는 cmdlet은 Az PowerShell 모듈을 참조하세요.

Syntax

Update-AzureSiteRecoveryProtectionDirection
      -RecoveryPlan <ASRRecoveryPlan>
      -Direction <String>
      [-WaitForCompletion]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]
Update-AzureSiteRecoveryProtectionDirection
      -RPId <String>
      -Direction <String>
      [-WaitForCompletion]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]
Update-AzureSiteRecoveryProtectionDirection
      -ProtectionEntityId <String>
      -ProtectionContainerId <String>
      -Direction <String>
      [-WaitForCompletion]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]
Update-AzureSiteRecoveryProtectionDirection
      -ProtectionEntity <ASRProtectionEntity>
      -Direction <String>
      [-WaitForCompletion]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

Description

Update-AzureSiteRecoveryProtectionDirection cmdlet은 커밋 장애 조치(failover) 작업이 완료된 후 Azure Site Recovery 개체의 보호를 위해 원본 및 대상 서버를 업데이트합니다.

예제

예제 1: 컨테이너에서 보호된 개체의 방향 수정

PS C:\> $Container = Get-AzureSiteRecoveryProtectionContainer 
PS C:\> $Protected = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $Container  
PS C:\> Update-AzureSiteRecoveryProtectionDirection -Direction RecoveryToPrimary -ProtectionEntity $Protected 
ID               : c38eecdc-731c-405b-a61c-08db99aae2fe
ClientRequestId  : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P
State            : NotStarted
StateDescription : NotStarted
StartTime        : 
EndTime          : 
AllowedActions   : {}
Name             : 
Tasks            : {}
Errors           : {}

첫 번째 명령은 Get-AzureSiteRecoveryProtectionContainer cmdlet을 사용하여 현재 Azure Site Recovery 자격 증명 모음에서 보호된 컨테이너를 가져오고 $Container 변수에 저장합니다.

두 번째 명령은 Get-AzureSiteRecoveryProtectionEntity cmdlet을 사용하여 $Container 저장된 컨테이너에 속하는 가상 머신을 가져옵니다. 이 명령은 결과를 $Protected 변수에 저장합니다.

마지막 명령은 $Protected 저장된 개체의 RecoverToPrimary 방향을 설정합니다.

매개 변수

-Direction

커밋의 방향을 지정합니다. 이 매개 변수에 허용되는 값은 다음과 같습니다.

  • PrimaryToRecovery
  • RecoveryToPrimary
Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Profile

이 cmdlet이 읽는 Azure 프로필을 지정합니다. 프로필을 지정하지 않으면 이 cmdlet은 로컬 기본 프로필에서 읽습니다.

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

-ProtectionContainerId

보호된 컨테이너의 ID를 지정합니다. 이 cmdlet은 이 매개 변수가 지정하는 컨테이너에 속하는 보호된 가상 머신의 방향을 수정합니다.

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

-ProtectionEntity

보호 엔터티 개체를 지정합니다.

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

-ProtectionEntityId

보호된 가상 머신의 ID를 지정합니다. 이 cmdlet은 이 매개 변수가 지정하는 보호된 가상 머신의 방향을 수정합니다.

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

-RecoveryPlan

복구 계획 개체를 지정합니다.

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

-RPId

복구 계획의 ID를 지정합니다. 이 cmdlet은 이 매개 변수가 지정하는 복구 계획의 방향을 수정합니다.

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

-WaitForCompletion

cmdlet이 Windows PowerShell 콘솔에 컨트롤을 반환하기 전에 작업이 완료될 때까지 대기한다는 것을 나타냅니다.

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