Add-AzureRmApplicationGatewayIPConfiguration

Adds an IP configuration to an application gateway.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Add-AzureRmApplicationGatewayIPConfiguration
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   [-SubnetId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Add-AzureRmApplicationGatewayIPConfiguration
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   [-Subnet <PSSubnet>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Add-AzureRmApplicationGatewayIPConfiguration cmdlet adds an IP configuration to an application gateway. IP configurations contain the subnet in which the application gateway is deployed.

Examples

Example 1: Add an virtual network configuration to an application gateway

PS C:\>$Vnet = Get-AzureRmVirtualNetwork -Name "Vnet01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $Vnet 
PS C:\> $AppGw = Get-AzureRmApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzureRmApplicationGatewayIPConfiguration -ApplicationGateway $AppGw -Name "Appgwsubnet01" -Subnet $Subnet

The first command creates a virtual network. The second command creates a subnet using the previously created virtual network. The third command gets the application gateway and stores it in the $AppGw variable. The fouth command adds the IP configuration to the application gateway stored in $AppGw.

Parameters

-ApplicationGateway

Specifies the application gateway to which this cmdlet adds an IP configuration.

Type:PSApplicationGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the IP configuration to add.

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

-Subnet

Specifies a subnet. This is the subnet in which the application gateway is deployed.

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

-SubnetId

Specifies a subnet ID. This is the subnet in which the application gateway is deployed.

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

Inputs

PSApplicationGateway

Parameters: ApplicationGateway (ByValue)

Outputs

PSApplicationGateway