< Back
Set-AzureSiteRecoveryProtectionEntity
Post
NAME Set-AzureSiteRecoveryProtectionEntity
SYNOPSIS
Sets the Protection on a protection entity for Azure Site Recovery
SYNTAX
Set-AzureSiteRecoveryProtectionEntity -Id <string> -ProtectedContainerId <string> -Protection <string> [-Force] [-WaitForCompletion] [<CommonParameters>]
Set-AzureSiteRecoveryProtectionEntity -Protection <string> -ProtectionEntity <ASRProtectionEntity> [-Force] [-OS <string>] [-OSDiskName <string>]
[-ProtectionProfile <ASRProtectionProfile>] [-WaitForCompletion] [<CommonParameters>]
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
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Protection <string>
set 'Enable' to enable protection and 'Disable' to disable protection
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectedContainerId <string>
ID of the Protected Container
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectionEntity <ASRProtectionEntity>
Protection Entity object
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-WaitForCompletion [<SwitchParameter>]
Waits till the operation completes
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Bypasses confirmation on passing
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectionProfile <ASRProtectionProfile>
Protection profile to be used to enable protection.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OS <string>
OS type e.g. Windows or Linux
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OSDiskName <string>
Name of the disk containing operating system.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, site, recovery
-------------------------- EXAMPLE 1 --------------------------
C:\\PS>$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 : {}
Description
-----------
The OS Parameter is mandatory when an on-premise Hyper-v site is protected to azure
RELATED LINKS
SYNOPSIS
Sets the Protection on a protection entity for Azure Site Recovery
SYNTAX
Set-AzureSiteRecoveryProtectionEntity -Id <string> -ProtectedContainerId <string> -Protection <string> [-Force] [-WaitForCompletion] [<CommonParameters>]
Set-AzureSiteRecoveryProtectionEntity -Protection <string> -ProtectionEntity <ASRProtectionEntity> [-Force] [-OS <string>] [-OSDiskName <string>]
[-ProtectionProfile <ASRProtectionProfile>] [-WaitForCompletion] [<CommonParameters>]
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
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Protection <string>
set 'Enable' to enable protection and 'Disable' to disable protection
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectedContainerId <string>
ID of the Protected Container
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectionEntity <ASRProtectionEntity>
Protection Entity object
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-WaitForCompletion [<SwitchParameter>]
Waits till the operation completes
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Bypasses confirmation on passing
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProtectionProfile <ASRProtectionProfile>
Protection profile to be used to enable protection.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OS <string>
OS type e.g. Windows or Linux
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OSDiskName <string>
Name of the disk containing operating system.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Keywords: azure, azuresm, servicemanagement, management, service, site, recovery
-------------------------- EXAMPLE 1 --------------------------
C:\\PS>$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 : {}
Description
-----------
The OS Parameter is mandatory when an on-premise Hyper-v site is protected to azure
RELATED LINKS