external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.Network.dll-Help.xml |
Az.Network |
D29C82CC-2080-48DA-880A-1AA83007E552 |
2.0.0 |
Creates a network interface IP configuration.
New-AzNetworkInterfaceIpConfig -Name <String> [-PrivateIpAddressVersion <String>] [-PrivateIpAddress <String>]
[-Primary] [-Subnet <PSSubnet>] [-PublicIpAddress <PSPublicIpAddress>]
[-LoadBalancerBackendAddressPool <PSBackendAddressPool[]>] [-LoadBalancerInboundNatRule <PSInboundNatRule[]>]
[-ApplicationGatewayBackendAddressPool <PSApplicationGatewayBackendAddressPool[]>]
[-ApplicationSecurityGroup <PSApplicationSecurityGroup[]>] [-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
New-AzNetworkInterfaceIpConfig -Name <String> [-PrivateIpAddressVersion <String>] [-PrivateIpAddress <String>]
[-Primary] [-SubnetId <String>] [-PublicIpAddressId <String>] [-LoadBalancerBackendAddressPoolId <String[]>]
[-LoadBalancerInboundNatRuleId <String[]>] [-ApplicationGatewayBackendAddressPoolId <String[]>]
[-ApplicationSecurityGroupId <String[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The New-AzNetworkInterfaceIpConfig cmdlet creates an Azure network interface IP configuration for a network interface.
$vnet = Get-AzVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$PIP1 = Get-AzPublicIpAddress -Name "PIP1" -ResourceGroupName "RG1"
$IPConfig1 = New-AzNetworkInterfaceIpConfig -Name "IPConfig-1" -Subnet $Subnet -PublicIpAddress $PIP1 -Primary
$nic = New-AzNetworkInterface -Name mynic1 -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.
$vnet = Get-AzVirtualNetwork -Name myvnet -ResourceGroupName myrg
$Subnet = Get-AzVirtualNetworkSubnetConfig -Name mysubnet -VirtualNetwork $vnet
$IPConfig2 = New-AzNetworkInterfaceIpConfig -Name "IP-Config2" -Subnet $Subnet -PrivateIpAddress 10.0.0.5
$nic = New-AzNetworkInterface -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.
Creates a network interface IP configuration. (autogenerated)
New-AzNetworkInterfaceIpConfig -Name 'IP-Config2' -PrivateIpAddress '10.0.1.10' -PrivateIpAddressVersion IPv4 -SubnetId <String>
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool[]
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of application gateway backend address pool references to which this network interface IP configuration belongs.
Type: System.String[]
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup[]
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of application security group references to which this network interface IP configuration belongs.
Type: System.String[]
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The reference of Gateway LoadBalancer Provider resource.
Type: System.String
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool[]
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of load balancer backend address pool references to which this network interface IP configuration belongs.
Type: System.String[]
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of load balancer inbound Nat Rule references to which this network interface IPConfiguration belongs.
Type: Microsoft.Azure.Commands.Network.Models.PSInboundNatRule[]
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a collection of load balancer inbound network address translation (NAT) rule references to which this network interface IP configuration belongs.
Type: System.String[]
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the network interface IP configuration.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the static IP address of the network interface IP configuration.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the IP address version of a network interface IP configuration. The acceptable values for this parameter are:
- IPv4
- IPv6
Type: System.String
Parameter Sets: (All)
Aliases:
Accepted values: IPv4, IPv6
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a PublicIPAddress object. This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet creates a reference to a public IP Address to associate with this network interface IP configuration.
Type: System.String
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a Subnet object. This cmdlet creates a reference to a subnet in which this network interface IP configuration is created.
Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Parameter Sets: SetByResource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a reference to a subnet in which this network interface IP configuration is created.
Type: System.String
Parameter Sets: SetByResourceId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Keywords: azure, azurerm, arm, resource, management, manager, network, networking
Add-AzNetworkInterfaceIpConfig
Get-AzNetworkInterfaceIpConfig