Set-​Azure​Rm​Recovery​Services​Asr​Replication​Protected​Item

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

Syntax

Set-AzureRmRecoveryServicesAsrReplicationProtectedItem
   -InputObject <ASRReplicationProtectedItem>
   [-LicenseType <String>]
   [-Name <String>]
   [-NicSelectionType <String>]
   [-PrimaryNic <String>]
   [-RecoveryNetworkId <String>]
   [-RecoveryNicStaticIPAddress <String>]
   [-RecoveryNicSubnetName <String>]
   [-RecoveryResourceGroupId <String>]
   [-Size <String>]
   [-Confirm]
   [-WhatIf]
   [<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.

Required Parameters

-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
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
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
Parameter Sets:NoLicenseType, WindowsServer
Position:Named
Default value:None
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
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
Parameter Sets:NotSelected, SelectedByUser
Position:Named
Default value:None
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
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
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
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
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
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
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem

Outputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob