Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzVirtualNetworkGatewayIpConfig

Creates an IP Configuration for a Virtual Network Gateway

Syntax

SetByResourceId

New-AzVirtualNetworkGatewayIpConfig
 -Name <String>
 [-PrivateIpAddress <String>]
 [-SubnetId <String>]
 [-PublicIpAddressId <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

SetByResource

New-AzVirtualNetworkGatewayIpConfig
 -Name <String>
 [-PrivateIpAddress <String>]
 [-Subnet <PSSubnet>]
 [-PublicIpAddress <PSPublicIpAddress>]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Examples

Example 1: Create an IP Configuration for a Virtual Network Gateway

$gwIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name myGWIpConfig -SubnetId $myGWsubnet.Id -PublicIpAddressId $myGWpip.Id

Configures a Virtual Network Gateway with a Public IP Address. The variable $myGWsubnet is obtained using the Get-AzVirtualNetworkSubnetConfig cmdlet on the "GatewaySubnet" within the Virtual Network you intend to create a Virtual Network Gateway. The variable $myGWpip is obtained using the New-AzPublicIpAddress cmdlet.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-Name

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PrivateIpAddress

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddress

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:PSPublicIpAddress
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddressId

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Subnet

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:PSSubnet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SubnetId

The New-AzVirtualNetworkGatewayIpConfig cmdlet creates a configuration assigned to a Virtual Network Gateway with a (previously created) Public IP Address based on Subnet ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSVirtualNetworkGatewayIpConfiguration

Related Links


Feedback

Was this page helpful?