Edit

Share via


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

configFile

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

configObject

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.

Parameter properties

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

Parameter sets

configObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

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

Parameter sets

configFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

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

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

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

Outputs

Microsoft.WindowsAzure.Management.ApplicationGateway.Models.ApplicationGatewayOperationResponse