New-AzRecoveryServicesAsrVMNicConfig
Creates an ASR NIC config that contains the failover and test failover related configuration details.
Syntax
Default (Default)
New-AzRecoveryServicesAsrVMNicConfig
-NicId <String>
-ReplicationProtectedItem <ASRReplicationProtectedItem>
[-RecoveryVMNetworkId <String>]
[-RecoveryNicName <String>]
[-RecoveryNicResourceGroupName <String>]
[-ReuseExistingNic]
[-RecoveryNetworkSecurityGroupId <String>]
[-EnableAcceleratedNetworkingOnRecovery]
[-TfoVMNetworkId <String>]
[-TfoNicName <String>]
[-TfoNicResourceGroupName <String>]
[-TfoReuseExistingNic]
[-TfoNetworkSecurityGroupId <String>]
[-EnableAcceleratedNetworkingOnTfo]
[-IPConfig <PSIPConfigInputDetails[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzRecoveryServicesAsrVMNicConfig cmdlet creates an ASR NIC config object that contains the failover and test failover related details. In case any information is not passed, the corresponding values are picked from the replication protected item to avoid these values being updated to null.
Important
We have deprecated the parameters corresponding to IP Configs from the cmdlet, and encapsulated them into a new cmdlet object. Please create a new object using the cmdlet New-AzRecoveryServicesAsrVMNicIPConfig and pass that as a parameter. Please refer to the examples below for more clarity.
Examples
Example 1
$ipConfig1 = New-AzRecoveryServicesAsrVMNicIPConfig -IpConfigName "ipconfig1" -RecoverySubnetName "default" `
-TfoSubnetName "default" -RecoveryStaticIPAddress "10.1.40.10" -TfoStaticIPAddress "10.3.4.33"
$ipConfig2 = New-AzRecoveryServicesAsrVMNicIPConfig -IpConfigName "ipconfig2" -IsSelectedForFailover -RecoverySubnetName "default" `
-TfoSubnetName "default" -RecoveryStaticIPAddress "10.1.40.13" -TfoStaticIPAddress "10.3.4.32"
$ipConfigs = @($ipConfig1, $ipConfig2)
$nicConfig = New-AzRecoveryServicesAsrVMNicConfig -NicId $AsrNicGuid -ReplicationProtectedItem $Rpi -RecoveryVMNetworkId $recoveryNetworkId `
-TfoVMNetworkId $tfoNetworkId -IPConfig $ipConfigs
Creates an ASRVmNicConfig object with the failover and test failover networking settings configured for the NIC. Any property that's not passed above is fetched from the protected item passed.
Example 2
$nicConfig = New-AzRecoveryServicesAsrVMNicConfig -NicId $AsrNicGuid -ReplicationProtectedItem $Rpi -TfoNicName $TfoNicName -TfoNicResourceGroupName $TfoNicRgName -TfoReuseExistingNic
Creates an ASRVmNicConfig object with the test failover networking settings configured for the NIC renaming. Any property that's not passed above is fetched from the protected item passed.
Parameters
-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
-EnableAcceleratedNetworkingOnRecovery
Specifies whether accelerated networking is enabled on recovery NIC.
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
-EnableAcceleratedNetworkingOnTfo
Specifies whether accelerated networking is enabled on test failover NIC.
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
-IPConfig
Specifies test failover/failover settings of NIC IP configs.
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
-NicId
Specify the ASR NIC GUID.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RecoveryNetworkSecurityGroupId
Specifies the ID of the NSG associated with 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
-RecoveryNicName
Specifies the name of 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
-RecoveryNicResourceGroupName
Specifies the name of the recovery NIC resource group.
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
-RecoveryVMNetworkId
Specifies the ID of the recovery virtual network.
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
-ReplicationProtectedItem
Specify the ASR Replication Protected Item.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReuseExistingNic
Specifies whether an existing NIC can be used during failover.
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
-TfoNetworkSecurityGroupId
Specifies the ID of the NSG associated with test failover 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
-TfoNicName
Specifies the name of the test failover 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
-TfoNicResourceGroupName
Specifies the name of the test failover NIC resource group.
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
-TfoReuseExistingNic
Specifies whether an existing NIC can be used during test failover.
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
-TfoVMNetworkId
Specifies the ID of the test failover virtual network.
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
-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 .
None
Outputs