Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureSiteRecoveryProtectionEntity

Set-AzureSiteRecoveryProtectionEntity

microsoft.azure.commands.recoveryservices.dll

Synopsis

Sets the Protection on a protection entity for Azure Site Recovery

Syntax

Set-AzureSiteRecoveryProtectionEntity [-Id] [-ProtectedContainerId] [-Protection] [-Force] [-WaitForCompletion] [<CommonParameters>]

Set-AzureSiteRecoveryProtectionEntity [-Protection] [-ProtectionEntity] [-Force] [-OS] [-OSDiskName] [-ProtectionProfile] [-WaitForCompletion] [<CommonParameters>]

Detailed Description

Sets the Protection on a protection entity for Azure Site Recovery. This is async cmdlet which will only start the operation and return the job object.

Parameters

-Id <string>

ID of the protection entity

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Protection <string>

set 'Enable' to enable protection and 'Disable' to disable protection

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ProtectedContainerId <string>

ID of the Protected Container

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ProtectionEntity <ASRProtectionEntity>

Protection Entity object

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-WaitForCompletion <SwitchParameter>

Waits till the operation completes

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Force <SwitchParameter>

Bypasses confirmation on passing

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ProtectionProfile <ASRProtectionProfile>

Protection profile to be used to enable protection.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-OS <string>

OS type e.g. Windows or Linux

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-OSDiskName <string>

Name of the disk containing operating system.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

The OS Parameter is mandatory when an on-premise Hyper-v site is protected to azure

$PC = Get-AzureSiteRecoveryProtectionContainer -Name "Cloud1"
$PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC -Name "VM1"
Set-AzureSiteRecoveryProtectionEntity -ProtectionEntity $PE -Protection Enable -ProtectionProfile $PC.AvailableProtectionProfiles[0] -OS Windows

Name             : EnableDr
ID               : 7d980e67-ad8c-45bc-99a6-6d8ca0a4a689
ClientRequestId  : d45eb812-de16-4bff-b4f4-a34ffa4afc5d-2015-02-18 15:31:12Z-P
State            : InProgress
StateDescription : InProgress
StartTime        : 2/18/2015 3:31:16 PM
EndTime          :
TargetObjectId   : 52fa9f2d-57d4-4036-a46f-b112d2d6ae72
TargetObjectType : ProtectionEntity
TargetObjectName : TestVM2
AllowedActions   :
Tasks            : {Prerequisites check for enabling protection, Identifying the replication target, Enablereplication, Starting initial replication...}
Errors           : {}