你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzRecoveryServicesAsrReplicationProtectedItem
Sets recovery properties such as target network and virtual machine size for the specified replication protected item.
Syntax
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 $DiskEncryptionSecertUrl `
-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.
Type: | ASRVMNicConfig[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureToAzureUpdateReplicationConfiguration
Specifies the disk configuration to updated for managed disk Vm (Azure to Azure DR scenrio).
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: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskEncryptionSecretUrl
Specifies the disk encryption secret URL with version(Azure disk encryption) to be used be recovery VM after failover.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskEncryptionVaultId
Specifies the disk encryption secret key vault ID(Azure disk encryption) to be used be recovery VM after failover.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskIdToDiskEncryptionSetMap
The dictionary of disk resource Id to disk encryption set ARM Id.
Type: | IDictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskTag
Specify the tags for the disks of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Type: | IDictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableAcceleratedNetworkingOnRecovery
Specifies the specified NIC on recovery vm after failover uses accelerated networking.
Type: | SwitchParameter |
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 |
-KeyEncryptionKeyUrl
Specifies the disk encryption key URL version(Azure disk encryption) to be used be recovery VM after failover.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyEncryptionVaultId
Specifies the disk encryption key keyVault ID(Azure disk encryption) to be used be recovery VM after failover.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
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 which will be used as primary NIC for recovery VM after after failover.
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 |
-RecoveryAvailabilityZone
Specifies availability zone 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 |
-RecoveryCapacityReservationGroupId
Specify the capacity reservation group Id to be used by the failover VM in target recovery region.
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 |
-RecoveryLBBackendAddressPoolId
Specifies the target backend address pools to be associated with the recovery NIC.
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 |
-RecoveryNetworkSecurityGroupId
Specifies the ID of the network security group to be associated with the recovery NIC.
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 |
-RecoveryNicTag
Specify the tags for the target NICs of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Type: | IDictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryProximityPlacementGroupId
Specifies the Resource Id of the recovery proximity placement group to failover teh virtual machine to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryPublicIPAddressId
Specifies the ID of the public IP address resource to be associated with the recovery NIC.
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 |
-RecoveryVirtualMachineScaleSetId
Specifies the target virtual machine scale set to be configured.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryVmTag
Specify the tags for target VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Type: | IDictionary<TKey,TValue>[System.String,System.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 |
-SqlServerLicenseType
Specify the SQL Server license type of the VM. This is applicable for Vmware to Azure and HyperV to Azure providers.
Type: | String |
Accepted values: | NoLicenseType, PAYG, AHUB |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TestNetworkId
Specifies the ARM Id of test network (Applicable only for VMware to Azure replication scenario).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TestNicStaticIPAddress
Specifies the test static IP address (Applicable only for VMware to Azure replication scenario).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TestNicSubnetName
Specifies the name of the test subnet (Applicable only for VMware to Azure replication scenario).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TfoAzureVMName
Specifies the name of the test failover VM.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UpdateNic
Specifies the NIC of the virtual machine for which this cmdlet sets the recovery network property needs to updated.
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 |