New-AzureRmVmssIpConfig

Creates an IP configuration for a network interface of a VMSS.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

New-AzureRmVmssIpConfig
   [[-Name] <String>]
   [[-Id] <String>]
   [[-SubnetId] <String>]
   [[-ApplicationGatewayBackendAddressPoolsId] <String[]>]
   [[-LoadBalancerBackendAddressPoolsId] <String[]>]
   [[-LoadBalancerInboundNatPoolsId] <String[]>]
   [-Primary]
   [-PrivateIPAddressVersion <String>]
   [-PublicIPAddressConfigurationName <String>]
   [-PublicIPAddressConfigurationIdleTimeoutInMinutes <Int32>]
   [-DnsSetting <String>]
   [-IpTag <VirtualMachineScaleSetIpTag[]>]
   [-PublicIPPrefix <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmVmssIpConfig cmdlet creates an IP configuration object for a network interface of a Virtual Machine Scale Set (VMSS). Specify the configuration from this cmdlet as the IPConfiguration parameter of the Add-AzureRmVmssNetworkInterfaceConfiguration cmdlet.

Examples

Example 1: Create an IP configuration object for a VMSS interface

PS C:\> $IPConfiguration = New-AzureRmVmssIPConfig -Name "ContosoVmssInterface02" -SubnetId $SubnetId

This command creates an IP configuration object named ContosoVmssInterface02. The command uses a previously defined subnet ID stored in $SubnetId. The command stores the configuration settings in the $IPConfiguration variable for later use with Add-AzureRmVmssNetworkInterfaceConfiguration.

Example 2: Create an IP configuration object that includes NAT pool settings

PS C:\> $IPConfiguration = New-AzureRmVmssIPConfig -Name "ContosoVmssInterface03" -LoadBalancerInboundNatPoolsId $expectedLb.InboundNatPools[0].Id -LoadBalancerBackendAddressPoolsId $expectedLb.BackendAddressPools[0].Id -SubnetId $SubnetId

This command creates an IP configuration object named ContosoVmssInterface03, and then stores it in the $IPConfiguration variable for later use. The command uses a previously defined subnet ID stored in $SubnetId. The command stores the configuration settings in the $IPConfiguration variable for later use. The command specifies values for the LoadBalancerInboundNatPoolsId and LoadBalancerBackendAddressPoolsId parameters.

Parameters

-ApplicationGatewayBackendAddressPoolsId

Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

Type:String[]
Position:3
Default value:None
Required:False
Accept pipeline input:True
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:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DnsSetting

The dns settings to be applied on the publicIP addresses. The domain name label of the Dns settings to be applied on the publicIP addresses. The concatenation of the domain name label and vm index will be the domain name labels of the Public IP Address resources that will be created.

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

-Id

Specifies an ID.

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

-IpTag

Specifies an array of Ip Tag objects.

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

-LoadBalancerBackendAddressPoolsId

Specifies an array of references to incoming network address translation (NAT) pools of the load balancers. A scale set can reference incoming NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

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

-LoadBalancerInboundNatPoolsId

Specifies an array of references to incoming NAT pools of the load balancers. A scale set can reference incoming NAT pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

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

-Name

Specifies the name of the IP configuration.

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

-Primary

Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.

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

-PrivateIPAddressVersion

Specify the ip configuration is either IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.

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

-PublicIPAddressConfigurationIdleTimeoutInMinutes

The idle timeout of the public IP address.

Type:Int32
Aliases:PublicIPAddressIdleTimeoutInMinutes
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PublicIPAddressConfigurationName

The publicIP address configuration name.

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

-PublicIPPrefix

The ID of Public IP Prefix

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

-SubnetId

Specifies the subnet ID in which the configuration creates the VMSS network interface.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
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

String

String[]

Int32

VirtualMachineScaleSetIpTag[]

Outputs

VirtualMachineScaleSetIPConfiguration