Set-AzureApplicationGatewayConfig

Configures an application gateway.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Set-AzureApplicationGatewayConfig
   -Name <String>
   -ConfigFile <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Set-AzureApplicationGatewayConfig
   -Name <String>
   -Config <ApplicationGatewayConfiguration>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Set-AzureApplicationGatewayConfig cmdlet configures an application gateway.

Examples

Example 1: Configure an application gateway by using a configuration object

PS C:\> $ConfigReturnObject = Get-AzureApplicationGatewayConfig -Name "ApplicationGateway02"
PS C:\> Set-AzureApplicationGatewayConfig -Name "ApplicationGateway06" -Config $ConfigReturnObject

The first command gets the configuration object for the application gateway named ApplicationGateway02 by using the Get-AzureApplicationGatewayConfig cmdlet. The command stores it in the $ConfigReturnObject variable.

The second command sets the configuration for the application named ApplicationGateway06 by using an application gateway configuration object stored in the $ConfigReturnObject variable.

Example 2: Configure an application gateway by using a configuration file

PS C:\> Set-AzureApplicationGatewayConfig -Name "ApplicationGateway06" -ConfigFile "D:\config.xml"

This command sets the configuration for the application named ApplicationGateway06 by using an application gateway configuration file in the specified location.

Example 3: Modify a configuration by using a configuration object

PS C:\> $ConfigReturnObject = Get-AzureApplicationGatewayConfig -Name "ApplicationGateway06"
PS C:\> $ConfigReturnObject.Config.FrontendPorts[0].Port = 443
PS C:\> $ConfigReturnObject | Set-AzureApplicationGatewayConfig -Name "ApplicationGateway06"

The first command gets the configuration object for the application gateway named ApplicationGateway06 by using the Get-AzureApplicationGatewayConfig cmdlet. The command stores it in the $ConfigReturnObject variable.

The second command assigns a port value to a Port property in the object stored in $ConfigReturnObject.

The final command passes the updated $ConfigReturnObject to the current cmdlet.

Parameters

-Config

Specifies an application gateway configuration object. This cmdlet assigns the configuration that this parameter specifies to an application gateway.

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

-ConfigFile

Specifies the path of a configuration file, in XML format, for an application gateway. This cmdlet assigns the configuration that this parameter specifies to an application gateway.

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

-Name

Specifies the name of the application gateway that this cmdlet configures.

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

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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

Inputs

System.String, Microsoft.Azure.Networking.ApplicationGatewayObjectModel.ApplicationGatewayConfiguration

Outputs

Microsoft.WindowsAzure.Management.ApplicationGateway.Models.ApplicationGatewayOperationResponse