Update-​Azure​Site​Recovery​Protection​Entity

Updates the properties of a protection entity in Azure Site Recovery.

Syntax

Update-AzureSiteRecoveryProtectionEntity
      [-Profile <AzureSMProfile>]
      -ProtectionEntity <ASRProtectionEntity>
      [-WaitForCompletion]
      [<CommonParameters>]

Description

The Update-AzureSiteRecoveryProtectionEntity cmdlet updates the properties of a protection entity in Azure Site Recovery, such as virtual machine owner information. This cmdlet is supported only for Virtual Machine Monitor (VMM) to VMM protected protection entities.

Examples

Example 1: Update a protection entity

PS C:\> $Container = Get-AzureSiteRecoveryProtectionContainer
PS C:\> $ProtectionEntity = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $Container
PS C:\> Update-AzureSiteRecoveryProtectionEntity -ProtectionEntity $ProtectionEntity
           Name             : 
           ID               : 680ffe0f-6236-465e-8c94-81242fa67e6d
           ClientRequestId  : 2c47e6ce-1460-4187-8a0f-b9073735fa38-2014-12-30 06:44:40Z-P
           State            : NotStarted
           StateDescription : NotStarted
           StartTime        : 
           EndTime          : 
           AllowedActions   : {}
           Tasks            : {}
           Errors           : {}

The first command gets a protected container by using the Get-AzureSiteRecoveryProtectionContainer cmdlet, and then stores that object in the $Container variable.

The second command gets the protected virtual machine that belongs to the container stored in $Container by using the Get-AzureSiteRecoveryProtectionEntity cmdlet, and then stores it in the $ProtectionEntity variable.

The final command updates the protection entity in $ProtectionEntity.

Required Parameters

-ProtectionEntity

Specifies a protection entity to update. To obtain an ASRProtectionEntity object, use the Get-AzureSiteRecoveryProtectionEntity cmdlet.

Type:ASRProtectionEntity
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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

Indicates that this cmdlet waits for the operation to complete before it returns control to the Windows PowerShell console.

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