Set-AzureRmRecoveryServicesAsrReplicationProtectedItem

Sets recovery properties such as target network and virtual machine size for the specified replication protected item.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Set-AzureRmRecoveryServicesAsrReplicationProtectedItem
   -InputObject <ASRReplicationProtectedItem>
   [-Name <String>]
   [-Size <String>]
   [-PrimaryNic <String>]
   [-RecoveryNetworkId <String>]
   [-RecoveryCloudServiceId <String>]
   [-RecoveryNicSubnetName <String>]
   [-RecoveryNicStaticIPAddress <String>]
   [-NicSelectionType <String>]
   [-RecoveryResourceGroupId <String>]
   [-LicenseType <String>]
   [-RecoveryAvailabilitySet <String>]
   [-RecoveryBootDiagStorageAccountId <String>]
   [-AzureToAzureUpdateReplicationConfiguration <ASRAzuretoAzureDiskReplicationConfig[]>]
   [-UseManagedDisk <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzureRmRecoveryServicesAsrReplicationProtectedItem cmdlet sets the recovery properties for a Replication Protected Item.

Examples

Example 1

PS C:\> $currentJob = Set-AzureRmRecoveryServicesAsrReplicationProtectedItem -ReplicationProtectedItem $RPI -PrimaryNic $NicId -RecoveryNetworkId $AzureNetworkID -RecoveryNicSubnetName $subnetName

Starts the operation of updating the replication protect item settings using the specified parameters and returns the ASR job used to track the operation.

Parameters

-AzureToAzureUpdateReplicationConfiguration

Specifies the update relication configration.

Type:ASRAzuretoAzureDiskReplicationConfig[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The input object to the cmdlet: The ASR replication protected item object corresponding to the replication protected item to update.

Type:ASRReplicationProtectedItem
Aliases:ReplicationProtectedItem
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LicenseType

Specifiy the license type selection to be used for Windows Server virtual machines. If you are entitled to use the Azure Hybrid Use Benefit (HUB) for migrations and would like to specify that the HUB setting be used while failing over this protected item set the license type to be WindowsServer.

Type:String
Accepted values:NoLicenseType, WindowsServer
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the recovery virtual machine that will be created on failover.

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

-NicSelectionType

Specifies the network interface card (NIC) properties set by user or set by default. You can specify NotSelected to go back to the default values.

Type:String
Accepted values:NotSelected, SelectedByUser
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PrimaryNic

Specifies the NIC of the virtual machine for which this cmdlet sets the recovery network property.

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

-RecoveryAvailabilitySet

Availability set for replication protected item after failover.

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

-RecoveryBootDiagStorageAccountId

Specifies the storage account for boot diagnostics for recovery azure VM.

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

-RecoveryCloudServiceId

The resource ID of the recovery cloud service to failover this virtual machine to.

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

-RecoveryNetworkId

Specifies the ID of the Azure virtual network to which the protected item should be failed over.

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

-RecoveryNicStaticIPAddress

Specifies the static IP address that should be assigned to primary NIC on recovery.

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

-RecoveryNicSubnetName

Specifies the name of the subnet on the recovery Azure virtual network to which this NIC of the protected item should be connected to on failover.

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

-RecoveryResourceGroupId

The ID of the Azure resource group in the recovery region in which the protected item will be recovered on failover.

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

-Size

Specifies the recovery virtual machine size. The value should be from the set of sizes supported by Azure virtual machines.

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

-UseManagedDisk

Specifies if the Azure virtual machine that is created on failover should use managed disks.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

ASRReplicationProtectedItem

Outputs

ASRJob