New-AzNetworkInterface
Creates a network interface.
New-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-EdgeZone <String>]
-IpConfiguration <PSNetworkInterfaceIPConfiguration[]>
[-DnsServer <String[]>]
[-InternalDnsNameLabel <String>]
[-DisableTcpStateTracking <String>]
[-EnableIPForwarding]
[-EnableAcceleratedNetworking]
[-AuxiliaryMode <String>]
[-AuxiliarySku <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-EdgeZone <String>]
-IpConfiguration <PSNetworkInterfaceIPConfiguration[]>
[-NetworkSecurityGroupId <String>]
[-NetworkSecurityGroup <PSNetworkSecurityGroup>]
[-DnsServer <String[]>]
[-InternalDnsNameLabel <String>]
[-DisableTcpStateTracking <String>]
[-EnableIPForwarding]
[-EnableAcceleratedNetworking]
[-AuxiliaryMode <String>]
[-AuxiliarySku <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-EdgeZone <String>]
-SubnetId <String>
[-PublicIpAddressId <String>]
[-NetworkSecurityGroupId <String>]
[-LoadBalancerBackendAddressPoolId <String[]>]
[-LoadBalancerInboundNatRuleId <String[]>]
[-ApplicationGatewayBackendAddressPoolId <String[]>]
[-ApplicationSecurityGroupId <String[]>]
[-PrivateIpAddress <String>]
[-IpConfigurationName <String>]
[-DnsServer <String[]>]
[-InternalDnsNameLabel <String>]
[-DisableTcpStateTracking <String>]
[-EnableIPForwarding]
[-EnableAcceleratedNetworking]
[-AuxiliaryMode <String>]
[-AuxiliarySku <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-EdgeZone <String>]
-Subnet <PSSubnet>
[-PublicIpAddress <PSPublicIpAddress>]
[-NetworkSecurityGroup <PSNetworkSecurityGroup>]
[-LoadBalancerBackendAddressPool <PSBackendAddressPool[]>]
[-LoadBalancerInboundNatRule <PSInboundNatRule[]>]
[-ApplicationGatewayBackendAddressPool <PSApplicationGatewayBackendAddressPool[]>]
[-ApplicationSecurityGroup <PSApplicationSecurityGroup[]>]
[-PrivateIpAddress <String>]
[-IpConfigurationName <String>]
[-DnsServer <String[]>]
[-InternalDnsNameLabel <String>]
[-DisableTcpStateTracking <String>]
[-EnableIPForwarding]
[-EnableAcceleratedNetworking]
[-AuxiliaryMode <String>]
[-AuxiliarySku <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The New-AzNetworkInterface cmdlet creates an Azure network interface.
New-AzNetworkInterface -Name "NetworkInterface1" -ResourceGroupName "ResourceGroup1" -Location "centralus" -SubnetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Network/virtualNetworks/VirtualNetwork1/subnets/Subnet1" -IpConfigurationName "IPConfiguration1" -DnsServer "8.8.8.8", "8.8.4.4"
This command creates a network interface named NetworkInterface001 with a dynamically assigned private IP address from Subnet1 in the virtual network named VirtualNetwork1. The command also assigns two DNS servers to the network interface. The IPConfiguration child resource will be created automatically using the name IPConfiguration1.
$Subnet = Get-AzVirtualNetwork -Name "VirtualNetwork1" -ResourceGroupName "ResourceGroup1"
$IPconfig = New-AzNetworkInterfaceIpConfig -Name "IPConfig1" -PrivateIpAddressVersion IPv4 -PrivateIpAddress "10.0.1.10" -SubnetId $Subnet.Subnets[0].Id
New-AzNetworkInterface -Name "NetworkInterface1" -ResourceGroupName "ResourceGroup1" -Location "centralus" -IpConfiguration $IPconfig
This example creates a new network interface using an IP configuration object. The IP configuration object specifies a static private IPv4 address. The first command retrieves an existing specified virtual network used to assign the subnet in the second command. The second command creates a network interface IP configuration named IPConfig1 and stores the configuration in the variable named $IPconfig. The third command creates a network interface named NetworkInterface1 that uses the network interface IP configuration stored in the variable named $IPconfig.
Creates a network interface. (autogenerated)
New-AzNetworkInterface -Location 'West US' -Name 'NetworkInterface1' -PrivateIpAddress '10.0.1.10' -ResourceGroupName 'ResourceGroup1' -SubnetId '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Network/virtualNetworks/VirtualNetwork1/subnets/Subnet1'
Specifies an ApplicationGatewayBackendAddressPool object.
Type: | PSApplicationGatewayBackendAddressPool[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of a ApplicationGatewayBackendAddressPool object.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a collection of application security group references to which the network interface IP configuration should belong to.
Type: | PSApplicationSecurityGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a collection of application security group references to which the network interface IP configuration should belong to.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The auxiliary mode of the Network Interface
Type: | String |
Accepted values: | None, MaxConnections, AcceleratedConnections, Floating |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The auxiliary sku of the Network Interface
Type: | String |
Accepted values: | None, A1, A2, A4, A8 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates whether to disable tcp state tracking.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the DNS server for the network interface.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
The edge zone of the network interface
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Enables accelerated networking.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that this cmdlet enables IP forwarding for the network interface. IP forwarding allows a virtual machine to receive traffic addressed to other destinations.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the creation of the network interface even if a network interface with the same name already exists.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the internal DNS name label for the new network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the IP configuration that this cmdlet uses for the network interface.
Type: | PSNetworkInterfaceIPConfiguration[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of an IP configuration.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a BackendAddressPool object.
Type: | PSBackendAddressPool[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of a BackendAddressPool object.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies an inbound NAT rule configuration for a load balancer.
Type: | PSInboundNatRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of an inbound NAT rule configuration for a load balancer.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the region for a network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the network interface to create.
Type: | String |
Aliases: | ResourceName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a NetworkSecurityGroup object.
Type: | PSNetworkSecurityGroup |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of a network security group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a static IPv4 IP address to assign to this network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a PublicIPAddress object to assign to a network interface.
Type: | PSPublicIpAddress |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of a PublicIPAddress object to assign to a network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of a resource group that the network interface belongs to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a Subnet object. This cmdlet creates a network interface for the subnet that this parameter specifies.
Type: | PSSubnet |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of the subnet for which to create a network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
PSNetworkInterfaceIPConfiguration[]
String[]
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: