Skip to content

Commit 0b32348

Browse files
Merge pull request #250832 from ChaitanyaNaykodi-MSFT/patch-174
(AzureCXP) fixed powershell sample
2 parents 7fd4e9b + 10dbae9 commit 0b32348

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

articles/application-gateway/custom-error.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ You can use Azure PowerShell to configure a custom error page. For example, a gl
9090
$appgw = Get-AzApplicationGateway -Name <app-gateway-name> -ResourceGroupName <resource-group-name>
9191
9292
$updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode HttpStatus502 -CustomErrorPageUrl "http://<website-url>"
93+
94+
Set-AzApplicationGateway -ApplicationGateway $appgw
9395
```
9496

9597
Or a listener level error page:
@@ -100,6 +102,8 @@ $appgw = Get-AzApplicationGateway -Name <app-gateway-name> -ResourceGroupName
100102
$listener01 = Get-AzApplicationGatewayHttpListener -Name <listener-name> -ApplicationGateway $appgw
101103
102104
$updatedlistener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502 -CustomErrorPageUrl "http://<website-url>"
105+
106+
Set-AzApplicationGateway -ApplicationGateway $appgw
103107
```
104108

105109
For more information, see [Add-AzApplicationGatewayCustomError](/powershell/module/az.network/add-azapplicationgatewaycustomerror) and [Add-AzApplicationGatewayHttpListenerCustomError](/powershell/module/az.network/add-azapplicationgatewayhttplistenercustomerror).

0 commit comments

Comments
 (0)