< Back
New-AzureRmNetworkInterfaceIpConfig
Post
NAME New-AzureRmNetworkInterfaceIpConfig
SYNOPSIS
Creates a network interface IP configuration.
SYNTAX
New-AzureRmNetworkInterfaceIpConfig [-ApplicationGatewayBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>] [-ApplicationSecurityGroup
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]>] [-DefaultProfile
<IAzureContextContainer>] [-LoadBalancerBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]>] [-LoadBalancerInboundNatRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSInboundNatRule]>] -Name <String> [-Primary] [-PrivateIpAddress
<String>] [-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddress <PSPublicIpAddress>] [-Subnet <PSSubnet>] [<CommonParameters>]
New-AzureRmNetworkInterfaceIpConfig [-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]
[-ApplicationSecurityGroupId <System.Collections.Generic.List`1[System.String]>] [-DefaultProfile <IAzureContextContainer>]
[-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>] [-LoadBalancerInboundNatRuleId
<System.Collections.Generic.List`1[System.String]>] -Name <String> [-Primary] [-PrivateIpAddress <String>] [-PrivateIpAddressVersion {IPv4 |
IPv6}] [-PublicIpAddressId <String>] [-SubnetId <String>] [<CommonParameters>]
DESCRIPTION
The New-AzureRmNetworkInterfaceIpConfig cmdlet creates an Azure network interface IP configuration for a network interface.
PARAMETERS
-ApplicationGatewayBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationSecurityGroup <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]>
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationSecurityGroupId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-LoadBalancerBackendAddressPool <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]>
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerInboundNatRule <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSInboundNatRule]>
Specifies a collection of load balancer inbound Nat Rule references to which this network interface IPConfiguration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer inbound network address translation (NAT) rule references to which this network interface IP
configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the network interface IP configuration.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Primary [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PrivateIpAddress <String>
Specifies the static IP address of the network interface IP configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PrivateIpAddressVersion <String>
Specifies the IP address version of a network interface IP configuration.
The acceptable values for this parameter are:
- IPv4
- IPv6
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublicIpAddress <PSPublicIpAddress>
Specifies a PublicIPAddress object. This cmdlet creates a reference to a public IP Address to associate with this network interface IP
configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublicIpAddressId <String>
This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Subnet <PSSubnet>
Specifies a Subnet object. This cmdlet creates a reference to a subnet in which this network interface IP configuration is created.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SubnetId <String>
Specifies a reference to a subnet in which this network interface IP configuration is created.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSNetworkInterfaceIPConfiguration
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, network, networking
1: Create an IP configuration with a public IP address for a network interface
$vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$PIP1 = Get-AzureRmPublicIPAddress -Name "PIP1" -ResourceGroupName "RG1"
$IPConfig1 = New-AzureRmNetworkInterfaceIpConfig -Name "IPConfig-1" -Subnet $Subnet -PublicIpAddress $PIP1
-Primary
$nic = New-AzureRmNetworkInterface -Name $NicName -ResourceGroupName myrg -Location westus
-IpConfiguration $IpConfig1
The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are
stored in $vnet and $Subnet respectively. The third command gets a previously created public IP address called PIP1. The forth command creates
a new IP configuration called "IPConfig-1" as the primary IP configuration with a public IP address associated with it. The last command
then creates a network interface called mynic1 using this IP configuration.
2: Create an IP configuration with a private IP address
$vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$IPConfig2 = New-AzureRmNetworkInterfaceIpConfig -Name "IP-Config2" -Subnet $Subnet -PrivateIpAddress
10.0.0.5
$nic = New-AzureRmNetworkInterface -Name mynic1 -ResourceGroupName myrg -Location westus -IpConfiguration
$IpConfig2
The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are
stored in $vnet and $Subnet respectively. The third command creates a new IP configuration called "IPConfig-2" with a private IP address
10.0.0.5 associated with it. The last command then creates a network interface called mynic1 using this IP configuration.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ceipconfig
Add-AzureRmNetworkInterfaceIpConfig
Get-AzureRmNetworkInterfaceIpConfig
Remove-AzureRmNetworkInterfaceIpConfig
Set-AzureRmNetworkInterfaceIpConfig
SYNOPSIS
Creates a network interface IP configuration.
SYNTAX
New-AzureRmNetworkInterfaceIpConfig [-ApplicationGatewayBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>] [-ApplicationSecurityGroup
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]>] [-DefaultProfile
<IAzureContextContainer>] [-LoadBalancerBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]>] [-LoadBalancerInboundNatRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSInboundNatRule]>] -Name <String> [-Primary] [-PrivateIpAddress
<String>] [-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddress <PSPublicIpAddress>] [-Subnet <PSSubnet>] [<CommonParameters>]
New-AzureRmNetworkInterfaceIpConfig [-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]
[-ApplicationSecurityGroupId <System.Collections.Generic.List`1[System.String]>] [-DefaultProfile <IAzureContextContainer>]
[-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>] [-LoadBalancerInboundNatRuleId
<System.Collections.Generic.List`1[System.String]>] -Name <String> [-Primary] [-PrivateIpAddress <String>] [-PrivateIpAddressVersion {IPv4 |
IPv6}] [-PublicIpAddressId <String>] [-SubnetId <String>] [<CommonParameters>]
DESCRIPTION
The New-AzureRmNetworkInterfaceIpConfig cmdlet creates an Azure network interface IP configuration for a network interface.
PARAMETERS
-ApplicationGatewayBackendAddressPool
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationSecurityGroup <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]>
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ApplicationSecurityGroupId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-LoadBalancerBackendAddressPool <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]>
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerInboundNatRule <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSInboundNatRule]>
Specifies a collection of load balancer inbound Nat Rule references to which this network interface IPConfiguration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer inbound network address translation (NAT) rule references to which this network interface IP
configuration belongs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the network interface IP configuration.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Primary [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PrivateIpAddress <String>
Specifies the static IP address of the network interface IP configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PrivateIpAddressVersion <String>
Specifies the IP address version of a network interface IP configuration.
The acceptable values for this parameter are:
- IPv4
- IPv6
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublicIpAddress <PSPublicIpAddress>
Specifies a PublicIPAddress object. This cmdlet creates a reference to a public IP Address to associate with this network interface IP
configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublicIpAddressId <String>
This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Subnet <PSSubnet>
Specifies a Subnet object. This cmdlet creates a reference to a subnet in which this network interface IP configuration is created.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SubnetId <String>
Specifies a reference to a subnet in which this network interface IP configuration is created.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSNetworkInterfaceIPConfiguration
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, network, networking
1: Create an IP configuration with a public IP address for a network interface
$vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$PIP1 = Get-AzureRmPublicIPAddress -Name "PIP1" -ResourceGroupName "RG1"
$IPConfig1 = New-AzureRmNetworkInterfaceIpConfig -Name "IPConfig-1" -Subnet $Subnet -PublicIpAddress $PIP1
-Primary
$nic = New-AzureRmNetworkInterface -Name $NicName -ResourceGroupName myrg -Location westus
-IpConfiguration $IpConfig1
The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are
stored in $vnet and $Subnet respectively. The third command gets a previously created public IP address called PIP1. The forth command creates
a new IP configuration called "IPConfig-1" as the primary IP configuration with a public IP address associated with it. The last command
then creates a network interface called mynic1 using this IP configuration.
2: Create an IP configuration with a private IP address
$vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$IPConfig2 = New-AzureRmNetworkInterfaceIpConfig -Name "IP-Config2" -Subnet $Subnet -PrivateIpAddress
10.0.0.5
$nic = New-AzureRmNetworkInterface -Name mynic1 -ResourceGroupName myrg -Location westus -IpConfiguration
$IpConfig2
The first two commands get a virtual network called myvnet and a subnet called mysubnet respectively that were previously created. These are
stored in $vnet and $Subnet respectively. The third command creates a new IP configuration called "IPConfig-2" with a private IP address
10.0.0.5 associated with it. The last command then creates a network interface called mynic1 using this IP configuration.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ceipconfig
Add-AzureRmNetworkInterfaceIpConfig
Get-AzureRmNetworkInterfaceIpConfig
Remove-AzureRmNetworkInterfaceIpConfig
Set-AzureRmNetworkInterfaceIpConfig