Set-​Azure​Rm​Network​Interface​Ip​Config

Sets the goal state for an Azure network interface IP configuration.

Syntax

Set-AzureRmNetworkInterfaceIpConfig
   [-ApplicationGatewayBackendAddressPool <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-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 <String>]
   [-PublicIpAddress <PSPublicIpAddress>]
   [-Subnet <PSSubnet>]
   [<CommonParameters>]
Set-AzureRmNetworkInterfaceIpConfig
   [-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]
   [-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>]
   -Name <String>
   -NetworkInterface <PSNetworkInterface>
   [-Primary]
   [-PrivateIpAddress <String>]
   [-PrivateIpAddressVersion <String>]
   [-PublicIpAddressId <String>]
   [-SubnetId <String>]
   [<CommonParameters>]

Description

The Set-AzureRmNetworkInterfaceIpConfig cmdlet sets the goal state for an Azure network interface IP configuration.

Examples

1: Changing the IP address of an IP configuration

$vnet = Get-AzureRmVirtualNetwork -Name myvnet -ResourceGroupName myrg
$subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet

$nic = Get-AzureRmNetworkInterface -Name nic1 -ResourceGroupName myrg

$nic | Set-AzureRmNetworkInterfaceIpConfig -Name ipconfig1 -PrivateIpAddress 10.0.0.11 -Subnet $subnet
    -Primary

$nic | Set-AzureRmNetworkInterface

The first two commands get a virtual network called myvnet and a subnet called mysubnet and store it in the variables $vnet and $subnet respectively. The third command gets the network interface nic1 associated with the IP configuration that needs to be updated. The third command sets the private IP address of the primary IP configuration ipconfig1 to 10.0.0.11. Finally, the last command updates the network interface ensuring the changes have been made successfully.

Required Parameters

-Name

Specifies the name of the network IP configuration for which this cmdlet sets.

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

Specifies a NetworkInterface object. This cmdlet adds a network interface IP configuration to the object that this parameter specifies.

Type:PSNetworkInterface
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-ApplicationGatewayBackendAddressPool

Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ApplicationGatewayBackendAddressPoolId

Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LoadBalancerBackendAddressPool

Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LoadBalancerBackendAddressPoolId

Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LoadBalancerInboundNatRule

Specifies a collection of load balancer inbound network address translation (NAT) rule references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSInboundNatRule]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LoadBalancerInboundNatRuleId

Specifies a collection of load balancer inbound NAT rule references to which this network interface IP configuration belongs.

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Primary
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrivateIpAddress

Specifies the static IP address of the network interface IP configuration.

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

Specifies the IP address version of a network interface IP configuration. The acceptable values for this parameter are:- IPv4

  • IPv6
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicIpAddress

Specifies a PublicIPAddress object. This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.

Type:PSPublicIpAddress
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicIpAddressId

This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.

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

Specifies a Subnet object. This cmdlet creates a reference to a subnet in which this network interface IP configuration is created.

Type:PSSubnet
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubnetId

This cmdlet creates a reference to a subnet in which this network interface IP configuration is created.

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

Notes

  • Keywords: azure, azurerm, arm, resource, management, manager, network, networking