< Back

New-AzureRmNetworkInterface

Tue Jan 29, 2019 9:56 pm

NAME New-AzureRmNetworkInterface



SYNOPSIS

Creates a network interface.





SYNTAX

New-AzureRmNetworkInterface [-ApplicationGatewayBackendAddressPool

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>] [-ApplicationSecurityGroup

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]>] [-AsJob] [-DefaultProfile

<IAzureContextContainer>] [-DnsServer <System.Collections.Generic.List`1[System.String]>] [-EnableAcceleratedNetworking] [-EnableIPForwarding]

[-Force] [-InternalDnsNameLabel <String>] [-IpConfigurationName <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]>] -Location <String> -Name <String>

[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-PrivateIpAddress <String>] [-PublicIpAddress <PSPublicIpAddress>] -ResourceGroupName <String>

-Subnet <PSSubnet> [-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]



New-AzureRmNetworkInterface [-ApplicationGatewayBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]

[-ApplicationSecurityGroupId <System.Collections.Generic.List`1[System.String]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DnsServer

<System.Collections.Generic.List`1[System.String]>] [-EnableAcceleratedNetworking] [-EnableIPForwarding] [-Force] [-InternalDnsNameLabel <String>]

[-IpConfigurationName <String>] [-LoadBalancerBackendAddressPoolId <System.Collections.Generic.List`1[System.String]>]

[-LoadBalancerInboundNatRuleId <System.Collections.Generic.List`1[System.String]>] -Location <String> -Name <String> [-NetworkSecurityGroupId

<String>] [-PrivateIpAddress <String>] [-PublicIpAddressId <String>] -ResourceGroupName <String> -SubnetId <String> [-Tag <Hashtable>] [-Confirm]

[-WhatIf] [<CommonParameters>]



New-AzureRmNetworkInterface [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DnsServer <System.Collections.Generic.List`1[System.String]>]

[-EnableAcceleratedNetworking] [-EnableIPForwarding] [-Force] [-InternalDnsNameLabel <String>] -IpConfiguration

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkInterfaceIPConfiguration]> -Location <String> -Name <String>

-ResourceGroupName <String> [-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]



New-AzureRmNetworkInterface [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DnsServer <System.Collections.Generic.List`1[System.String]>]

[-EnableAcceleratedNetworking] [-EnableIPForwarding] [-Force] [-InternalDnsNameLabel <String>] -IpConfiguration

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkInterfaceIPConfiguration]> -Location <String> -Name <String>

[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-NetworkSecurityGroupId <String>] -ResourceGroupName <String> [-Tag <Hashtable>] [-Confirm]

[-WhatIf] [<CommonParameters>]





DESCRIPTION

The New-AzureRmNetworkInterface cmdlet creates an Azure network interface.





PARAMETERS

-ApplicationGatewayBackendAddressPool

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>

Specifies an ApplicationGatewayBackendAddressPool object.



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 the ID of a ApplicationGatewayBackendAddressPool object.



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 the network interface IP configuration should belong to.



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 the network interface IP configuration should belong to.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

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



-DnsServer <System.Collections.Generic.List`1[System.String]>

Specifies the DNS server for the network interface.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-EnableAcceleratedNetworking [<SwitchParameter>]

Enables accelerated networking.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-EnableIPForwarding [<SwitchParameter>]

Indicates that this cmdlet enables IP forwarding for the network interface. IP forwarding allows a virtual machine to receive traffic

addressed to other destinations.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the creation of the network interface even if a network interface with the same name already exists.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-InternalDnsNameLabel <String>

Specifies the internal DNS name label for the new network interface.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-IpConfiguration <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkInterfaceIPConfiguration]>

Specifies the IP configuration that this cmdlet uses for the network interface.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-IpConfigurationName <String>

Specifies the name of an IP configuration.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-LoadBalancerBackendAddressPool <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool]>

Specifies a BackendAddressPool object.



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 the ID of a BackendAddressPool object.



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 an inbound NAT rule configuration for a load balancer.



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 the ID of an inbound NAT rule configuration for a load balancer.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Location <String>

Specifies the region for a network interface.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name of the network interface to create.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-NetworkSecurityGroup <PSNetworkSecurityGroup>

Specifies a NetworkSecurityGroup object.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-NetworkSecurityGroupId <String>

Specifies the ID of a network security group.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PrivateIpAddress <String>

Specifies a static IPv4 IP address to assign to this network interface.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PublicIpAddress <PSPublicIpAddress>

Specifies a PublicIPAddress object to assign to a network interface.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PublicIpAddressId <String>

Specifies the ID of a PublicIPAddress object to assign to a network interface.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of a resource group that the network interface belongs to.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Subnet <PSSubnet>

Specifies a Subnet object. This cmdlet creates a network interface for the subnet that this parameter specifies.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SubnetId <String>

Specifies the ID of the subnet for which to create a network interface.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <Hashtable>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

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.PSNetworkInterface







NOTES









Example 1: Create an Azure network interface



PS C:\\>New-AzureRmNetworkInterface -Name "NetworkInterface1" -ResourceGroupName "ResourceGroup1" -Location "centralus" -SubnetId "/subscriptions/xx

xxxxxx-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.





Example 2: Create an Azure network interface using an IP configuration object



PS C:\\>$IPconfig = New-AzureRmNetworkInterfaceIpConfig -Name "IPConfig1" -PrivateIpAddressVersion IPv4 -PrivateIpAddress "10.0.1.10" -SubnetId "/su

bscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Network/virtualNetworks/VirtualNetwork1/subnets/

Subnet1"

PS C:\\> New-AzureRmNetworkInterface -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 creates a network interface IP configuration named IPConfig1 and stores the configuration in the variable named $IPconfig.



The second command creates a network interface named NetworkInterface1 that uses the network interface IP configuration stored in the variable

named $IPconfig.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... kinterface

Get-AzureRmNetworkInterface

Remove-AzureRmNetworkInterface

Set-AzureRmNetworkInterface