Skip to content

Commit 76ad65d

Browse files
committed
cli sample
1 parent f0f6bed commit 76ad65d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-networking.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ See [Azure Load Balancer and Virtual Machine Scale Sets](../load-balancer/load-b
4242

4343
## Add a Virtual Machine Scale Set to an Application Gateway
4444

45-
To add a scale set to the backend pool of an Application Gateway, reference the Application Gateway backend pool in your scale sets network profile. This can be done either when creating the scale set or on an existing scale set.
45+
To add a scale set to the backend pool of an Application Gateway, reference the Application Gateway backend pool in your scale sets network profile. This can be done either when creating the scale set (see ARM Template below) or on an existing scale set.
4646

4747
### [Portal](#tab/portal1)
4848

@@ -84,6 +84,16 @@ To add a scale set to the backend pool of an Application Gateway, reference the
8484
8585
```
8686

87+
### [CLI](#tab/cli1)
88+
89+
```azurecli
90+
$appGWName=<appGwName>
91+
$appGWResourceGroup=<appGWRGName>
92+
$backendPoolName=<backendPoolName>
93+
$backendPoolId=$(az network application-gateway address-pool show --gateway-name $appGWName -g $appGWResourceGroup -n $backendPoolName --query id -otsv)
94+
95+
```
96+
8797
### [ARM template](#tab/arm1)
8898

8999
```json

0 commit comments

Comments
 (0)