Set-AzureRmSiteRecoveryProtectionEntity

Sets the state for a Site Recovery protection entity.

Syntax

Set-AzureRmSiteRecoveryProtectionEntity
   -ProtectionEntity <ASRProtectionEntity>
   -Protection <String>
   [-WaitForCompletion]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzureRmSiteRecoveryProtectionEntity
   -ProtectionEntity <ASRProtectionEntity>
   -Protection <String>
   -Policy <ASRPolicy>
   [-WaitForCompletion]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzureRmSiteRecoveryProtectionEntity
   -ProtectionEntity <ASRProtectionEntity>
   -Protection <String>
   -Policy <ASRPolicy>
   -RecoveryAzureStorageAccountId <String>
   [-WaitForCompletion]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzureRmSiteRecoveryProtectionEntity
   -ProtectionEntity <ASRProtectionEntity>
   -Protection <String>
   -Policy <ASRPolicy>
   -RecoveryAzureStorageAccountId <String>
   -OSDiskName <String>
   -OS <String>
   [-WaitForCompletion]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzureRmSiteRecoveryProtectionEntity cmdlet enables or disables protection on an Azure Site Recovery protection entity.

Required Parameters

-OS

Specifies the operating system type. The acceptable values for this parameter are:

  • Windows
  • Linux
Type:String
Parameter Sets:Windows, Linux
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OSDiskName

Specifies the name of the disk that contains the operating system.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Policy

Specifies the Site Recovery policy object.

Type:Microsoft.Azure.Commands.SiteRecovery.ASRPolicy
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Protection

Specifies whether protection should be enabled or disabled. The acceptable values for this parameter are:

  • Enable
  • Disable
Type:String
Parameter Sets:Enable, Disable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionEntity

Specifies the protection entity object.

Type:Microsoft.Azure.Commands.SiteRecovery.ASRProtectionEntity
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RecoveryAzureStorageAccountId

Specifies the ID of the target Azure Storage account.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WaitForCompletion

Indicates that the command waits for completion before returning.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs.

The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ASRProtectionEntity

Parameter 'ProtectionEntity' accepts value of type 'ASRProtectionEntity' from the pipeline

Outputs

Microsoft.Azure.Commands.SiteRecovery.ASRJob