< Back
Add-AzureRmNetworkInterfaceIpConfig
Post
NAME Add-AzureRmNetworkInterfaceIpConfig
SYNOPSIS
Adds a network interface IP configuration to a network interface.
SYNTAX
Add-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> -NetworkInterface
<PSNetworkInterface> [-Primary] [-PrivateIpAddress <String>] [-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddress <PSPublicIpAddress>]
[-Subnet <PSSubnet>] [<CommonParameters>]
Add-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> -NetworkInterface <PSNetworkInterface> [-Primary] [-PrivateIpAddress <String>]
[-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddressId <String>] [-SubnetId <String>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmNetworkInterfaceIpConfig cmdlet adds a network interface IP configuration to an Azure 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 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
-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer inbound 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
-NetworkInterface <PSNetworkInterface>
Specifies a NetworkInterface object. This cmdlet adds a network interface IP configuration to the object that this parameter specifies.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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>
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
<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
PSNetworkInterface
Parameter 'NetworkInterface' accepts value of type 'PSNetworkInterface' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSNetworkInterface
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, network, networking
Example 1: Add a new IP configuration with an application security group
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name MySubnet -AddressPrefix 10.0.1.0/24
$vnet = New-AzureRmvirtualNetwork -Name MyVNET -ResourceGroupName MyResourceGroup -Location "West US" -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$nic = New-AzureRmNetworkInterface -Name MyNetworkInterface -ResourceGroupName MyResourceGroup -Location "West US" -Subnet $vnet.Subnets[0]
$asg = New-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name MyASG -Location "West US"
$nic | Set-AzureRmNetworkInterfaceIpConfig -Name $nic.IpConfigurations[0].Name -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg |
Set-AzureRmNetworkInterface
$nic | Add-AzureRmNetworkInterfaceIpConfig -Name MyNewIpConfig -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg |
Set-AzureRmNetworkInterface
In this example, we create a new network interface MyNetworkInterface that belongs to a subnet in the new virtual network MyVNET. We also create
an empty application security group MyASG to associate with the IP configurations in the network interface. Once both objects are created, we link
the default IP configuration to the MyASG object. At last, we create a new IP configuration in the network interface also linked to the
application security group object.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ceipconfig
Get-AzureRmNetworkInterfaceIpConfig
New-AzureRmNetworkInterfaceIpConfig
Remove-AzureRmNetworkInterfaceIpConfig
Set-AzureRmNetworkInterfaceIpConfig
SYNOPSIS
Adds a network interface IP configuration to a network interface.
SYNTAX
Add-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> -NetworkInterface
<PSNetworkInterface> [-Primary] [-PrivateIpAddress <String>] [-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddress <PSPublicIpAddress>]
[-Subnet <PSSubnet>] [<CommonParameters>]
Add-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> -NetworkInterface <PSNetworkInterface> [-Primary] [-PrivateIpAddress <String>]
[-PrivateIpAddressVersion {IPv4 | IPv6}] [-PublicIpAddressId <String>] [-SubnetId <String>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmNetworkInterfaceIpConfig cmdlet adds a network interface IP configuration to an Azure 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 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
-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>
Specifies a collection of load balancer inbound 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
-NetworkInterface <PSNetworkInterface>
Specifies a NetworkInterface object. This cmdlet adds a network interface IP configuration to the object that this parameter specifies.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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>
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
<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
PSNetworkInterface
Parameter 'NetworkInterface' accepts value of type 'PSNetworkInterface' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSNetworkInterface
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, network, networking
Example 1: Add a new IP configuration with an application security group
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name MySubnet -AddressPrefix 10.0.1.0/24
$vnet = New-AzureRmvirtualNetwork -Name MyVNET -ResourceGroupName MyResourceGroup -Location "West US" -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$nic = New-AzureRmNetworkInterface -Name MyNetworkInterface -ResourceGroupName MyResourceGroup -Location "West US" -Subnet $vnet.Subnets[0]
$asg = New-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name MyASG -Location "West US"
$nic | Set-AzureRmNetworkInterfaceIpConfig -Name $nic.IpConfigurations[0].Name -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg |
Set-AzureRmNetworkInterface
$nic | Add-AzureRmNetworkInterfaceIpConfig -Name MyNewIpConfig -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg |
Set-AzureRmNetworkInterface
In this example, we create a new network interface MyNetworkInterface that belongs to a subnet in the new virtual network MyVNET. We also create
an empty application security group MyASG to associate with the IP configurations in the network interface. Once both objects are created, we link
the default IP configuration to the MyASG object. At last, we create a new IP configuration in the network interface also linked to the
application security group object.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ceipconfig
Get-AzureRmNetworkInterfaceIpConfig
New-AzureRmNetworkInterfaceIpConfig
Remove-AzureRmNetworkInterfaceIpConfig
Set-AzureRmNetworkInterfaceIpConfig