編輯

共用方式為


New-AzRecoveryServicesAsrVMNicIPConfig

Creates an ASR NIC IP config that contains the failover and test failover configuration details for each IP Config (Primary and Secondary) of the NIC.

Syntax

New-AzRecoveryServicesAsrVMNicIPConfig
   -IpConfigName <String>
   [-IsSelectedForFailover]
   [-RecoverySubnetName <String>]
   [-RecoveryStaticIPAddress <String>]
   [-RecoveryPublicIPAddressId <String>]
   [-RecoveryLBBackendAddressPoolId <String[]>]
   [-TfoSubnetName <String>]
   [-TfoStaticIPAddress <String>]
   [-TfoPublicIPAddressId <String>]
   [-TfoLBBackendAddressPoolId <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzRecoveryServicesAsrVMNicIPConfig cmdlet creates an IP Config object that contains the failover and test failover details for each IP Config (Primary and Secondary) of the NIC. This further should be passed as a parameter to ** New-AzRecoveryServicesAsrVMNicConfig** for setting these values in the ASR NIC Config Object.

Examples

Example 1

$ipConfig = New-AzRecoveryServicesAsrVMNicIPConfig -IpConfigName "ipconfig1" -RecoverySubnetName "default" `
-TfoSubnetName "default" -RecoveryStaticIPAddress "10.1.40.10" -TfoStaticIPAddress "10.3.4.33"

Creates an PSIPConfigInputDetails object with the failover and test failover networking settings configured for IP config of a NIC .

Parameters

-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

-IpConfigName

Specify the IP config name.

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

-IsSelectedForFailover

Specifies whether an existing IP config is selected for test failover/failover.

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

-RecoveryLBBackendAddressPoolId

Specifies the IDs of backend address pools for the recovery IP config.

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 associated with the recovery IP config.

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

-RecoveryStaticIPAddress

Specifies the IP address of the recovery IP config.

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

-RecoverySubnetName

Specifies the name of the recovery subnet.

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

-TfoLBBackendAddressPoolId

Specifies the IDs of backend address pools for the test failover IP config.

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

-TfoPublicIPAddressId

Specifies the ID of the public IP address associated with the test failover IP config.

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

-TfoStaticIPAddress

Specifies the IP address of the test failover IP config.

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

-TfoSubnetName

Specifies the name of the test failover subnet.

Type:String
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

None

Outputs

PSIPConfigInputDetails