You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/load-balancer/tutorial-gateway-powershell.md
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,7 +236,7 @@ New-AzLoadBalancer @lb
236
236
## Add network virtual appliances to the Gateway Load Balancer backend pool
237
237
Deploy NVAs through the Azure Marketplace. Once deployed, add the virtual machines to the backend pool with [Add-AzVMNetworkInterface](/powershell/module/az.compute/add-azvmnetworkinterface)
238
238
239
-
## Chain load balancer frontend to gateway load balancer
239
+
## Chain load balancer frontend to Gateway Load Balancer
240
240
241
241
In this example, you'll chain the frontend of a standard load balancer to the gateway load balancer.
242
242
@@ -279,6 +279,41 @@ $config | Set-AzLoadBalancer
279
279
280
280
```
281
281
282
+
## Chain virtual machine to Gateway Load Balancer
283
+
284
+
Alternatively, you can chain a VM's NIC IP configuration to the gateway load balancer.
285
+
286
+
You'll add the gateway load balancer's frontend to an existing VM's NIC IP configuration.
287
+
288
+
Use [Set-AzNetworkInterfaceIpConfig](/powershell/module/az.network/set-aznetworkinterfaceipconfig) to chain the gateway load balancer frontend to your existing VM's NIC IP configuration.
289
+
290
+
```azurepowershell-interactive
291
+
## Place the gateway load balancer configuration into a variable. ##
292
+
$par1 = @{
293
+
ResourceGroupName = 'TutorGwLB-rg'
294
+
Name = 'myLoadBalancer-gw'
295
+
}
296
+
$gwlb = Get-AzLoadBalancer @par1
297
+
298
+
## Place the existing NIC into a variable. ##
299
+
$par2 = @{
300
+
ResourceGroupName = 'MyResourceGroup'
301
+
Name = 'myNic'
302
+
}
303
+
$nic = Get-AzNetworkInterface @par2
304
+
305
+
## Chain the gateway load balancer to your existing VM NIC. ##
When no longer needed, you can use the [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) command to remove the resource group, load balancer, and the remaining resources.
0 commit comments