Set-AzRecoveryServicesAsrReplicationProtectedItem
Sets recovery properties such as target network and virtual machine size for the specified replication protected item.
Syntax
Default (Default)
Set-AzRecoveryServicesAsrReplicationProtectedItem
-InputObject <ASRReplicationProtectedItem>
[-Name <String>]
[-Size <String>]
[-UpdateNic <String>]
[-RecoveryNetworkId <String>]
[-PrimaryNic <String>]
[-RecoveryCloudServiceId <String>]
[-RecoveryNicSubnetName <String>]
[-RecoveryNicStaticIPAddress <String>]
[-TestNicSubnetName <String>]
[-TestNicStaticIPAddress <String>]
[-NicSelectionType <String>]
[-RecoveryResourceGroupId <String>]
[-LicenseType <String>]
[-RecoveryAvailabilitySet <String>]
[-SqlServerLicenseType <String>]
[-RecoveryVmTag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-DiskTag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-RecoveryNicTag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-RecoveryAvailabilityZone <String>]
[-RecoveryProximityPlacementGroupId <String>]
[-RecoveryVirtualMachineScaleSetId <String>]
[-RecoveryCapacityReservationGroupId <String>]
[-EnableAcceleratedNetworkingOnRecovery]
[-RecoveryBootDiagStorageAccountId <String>]
[-AzureToAzureUpdateReplicationConfiguration <ASRAzuretoAzureDiskReplicationConfig[]>]
[-DiskEncryptionVaultId <String>]
[-DiskEncryptionSecretUrl <String>]
[-KeyEncryptionKeyUrl <String>]
[-KeyEncryptionVaultId <String>]
[-UseManagedDisk <String>]
[-DiskIdToDiskEncryptionSetMap <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-RecoveryPublicIPAddressId <String>]
[-RecoveryNetworkSecurityGroupId <String>]
[-RecoveryLBBackendAddressPoolId <String[]>]
[-TfoAzureVMName <String>]
[-ASRVMNicConfiguration <ASRVMNicConfig[]>]
[-TestNetworkId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzRecoveryServicesAsrReplicationProtectedItem cmdlet sets the recovery properties for a Replication Protected Item.
Examples
Example 1
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -ReplicationProtectedItem $RPI -UpdateNic $NicId -RecoveryNetworkId $AzureNetworkID -RecoveryNicSubnetName $subnetName
Starts the operation of updating the replication protected item settings using the specified parameters and returns the ASR job used to track the operation.
Example 2
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -UpdateNic "00:50:56:8F:3F:7B" -RecoveryNetworkId $recoveryNetwork -RecoveryNicSubnetName $recoverySubnet -NicSelectionType NotSelected
Starts the operation of updating the replication protected item Network Interface card(NIC Reduction) settings using the specified parameters and returns the ASR job used to track the operation.
Example 3
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -PrimaryNic "00:50:56:8F:3F:7B"
Starts the operation of updating the replication protected item primary NIC(to used for recovered vm )settings using the specified parameters and returns the ASR job used to track the operation.
Example 4
Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -UpdateNic $updateNic -RecoveryNetworkId $recoveryNetworkId -RecoveryNicSubnetName $recoveryNicSubnetName -NicSelectionType SelectedByUser
Starts the operation of updating the replication protected item NIC (to used for recovered vm )settings using the specified parameters and returns the ASR job used to track the operation.
Example 5
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -UpdateNic $updateNic `
-RecoveryNetworkId $recoveryNetworkId -RecoveryNicSubnetName $recoveryNicSubnetName -EnableAcceleratedNetworkingOnRecovery
Starts the operation of updating the replication protected item selected noc tp enable accelerated networking on recovery VM(for Azure to Azure disaster recovery).
Don't pass -EnableAcceleratedNetworkingOnRecovery to disable accelerated Networking.
Example 6
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi `
-DiskEncryptionVaultId $DiskEncryptionVaultId -DiskEncryptionSecretUrl $DiskEncryptionSecretUrl `
-KeyEncryptionVaultId $KeyEncryptionVaultId -KeyEncryptionKeyUrl $KeyEncryptionKeyUrl
Start the update operation for the specified encrypted replication protected item to use supplied encryption details for failover VM.
Example 7
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -RecoveryProximityPlacementGroupId $ppg
Start the update operation for the specified replication protected item to use the supplied proximity placement group for failover VM.
Example 8
$currentJob = Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -RecoveryVirtualMachineScaleSetId $vmss
Start the update operation for the specified replication protected item to use the supplied virtual machine scale set for failover VM.
Parameters
-ASRVMNicConfiguration
Specifies the test failover and failover NIC configuration details.
Parameter properties
Type: ASRVMNicConfig [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureToAzureUpdateReplicationConfiguration
Specifies the disk configuration to updated for managed disk Vm (Azure to Azure DR scenario).
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskEncryptionSecretUrl
Specifies the disk encryption secret URL with version(Azure disk encryption) to be used be recovery VM after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskEncryptionVaultId
Specifies the disk encryption secret key vault ID(Azure disk encryption) to be used be recovery VM after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskIdToDiskEncryptionSetMap
The dictionary of disk resource Id to disk encryption set ARM Id.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskTag
Specify the tags for the disks of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableAcceleratedNetworkingOnRecovery
Specifies the specified NIC on recovery vm after failover uses accelerated networking.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The input object to the cmdlet: The ASR replication protected item object corresponding to the replication protected item to update.
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyEncryptionKeyUrl
Specifies the disk encryption key URL version(Azure disk encryption) to be used be recovery VM after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyEncryptionVaultId
Specifies the disk encryption key keyVault ID(Azure disk encryption) to be used be recovery VM after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LicenseType
Specify 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.
Parameter properties
Type: String
Default value: None
Accepted values: NoLicenseType, WindowsServer
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the name of the recovery virtual machine that will be created on failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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.
Parameter properties
Type: String
Default value: None
Accepted values: NotSelected, SelectedByUser
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PrimaryNic
Specifies the NIC which will be used as primary NIC for recovery VM after after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryAvailabilitySet
Availability set for replication protected item after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryAvailabilityZone
Specifies availability zone for replication protected item after failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryBootDiagStorageAccountId
Specifies the storage account for boot diagnostics for recovery azure VM.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryCapacityReservationGroupId
Specify the capacity reservation group Id to be used by the failover VM in target recovery region.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryCloudServiceId
The resource ID of the recovery cloud service to failover this virtual machine to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryLBBackendAddressPoolId
Specifies the target backend address pools to be associated with the recovery NIC.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryNetworkId
Specifies the ID of the Azure virtual network to which the protected item should be failed over.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryNetworkSecurityGroupId
Specifies the ID of the network security group to be associated with the recovery NIC.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryNicStaticIPAddress
Specifies the static IP address that should be assigned to primary NIC on recovery.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryNicTag
Specify the tags for the target NICs of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryProximityPlacementGroupId
Specifies the Resource Id of the recovery proximity placement group to failover teh virtual machine to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryPublicIPAddressId
Specifies the ID of the public IP address resource to be associated with the recovery NIC.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryResourceGroupId
The ID of the Azure resource group in the recovery region in which the protected item will be recovered on failover.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryVirtualMachineScaleSetId
Specifies the target virtual machine scale set to be configured.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryVmTag
Specify the tags for target VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Size
Specifies the recovery virtual machine size.
The value should be from the set of sizes supported by Azure virtual machines.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SqlServerLicenseType
Specify the SQL Server license type of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Parameter properties
Type: String
Default value: None
Accepted values: NoLicenseType, PAYG, AHUB
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestNetworkId
Specifies the ARM Id of test network (Applicable only for VMware to Azure replication scenario).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestNicStaticIPAddress
Specifies the test static IP address (Applicable only for VMware to Azure replication scenario).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestNicSubnetName
Specifies the name of the test subnet (Applicable only for VMware to Azure replication scenario).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TfoAzureVMName
Specifies the name of the test failover VM.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UpdateNic
Specifies the NIC of the virtual machine for which this cmdlet sets the recovery network property needs to updated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UseManagedDisk
Specifies if the Azure virtual machine that is created on failover should use managed disks.
Parameter properties
Type: String
Default value: None
Accepted values: True, False
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs