Set-​Azure​Application​Gateway​Config

Configures an application gateway.

Syntax

Set-AzureApplicationGatewayConfig
   -Config <ApplicationGatewayConfiguration>
   -Name <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Set-AzureApplicationGatewayConfig
   -ConfigFile <String>
   -Name <String>
   [-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.

Required 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
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

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

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

Optional Parameters

-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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

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

Outputs

Microsoft.WindowsAzure.Management.ApplicationGateway.Models.ApplicationGatewayOperationResponse