PowerShell: 101-loadbalancer-with-multivip

Virtual Network with two Subnets


This is a conversion of ARM template 101-loadbalancer-with-multivip  from the repository azure\azure-quickstart-templates  to PowerShell Script.

This script allows you to create a Load Balancer, 2 Public IP addresses for the Load balancer, Virtual Network, Network Interface in the Virtual Network. Each VIP is associated to a LB rule that is used by the Network Interface, and it will deploy the following resources…

… and in-addition to it, just in-case if the deployment is not successful, then it will rollback the entire deployment.


If the specified resource group is already exist then the script will not continue with the deployment.


Deploy-AzResource.ps1 [-ResourceGroupName] <string> [-Location] <string> [[-AddressPrefix] <string>] [[-SubnetPrefix] <string>] [-DNSNameforLBIP] <string> [[-PublicIPAddressType] <string>] [<CommonParameters>]


I 💙 PS> $param = @{
>> ResourceGroupName = 'simple-rg'
>> Location = 'westus'
>> DNSNameforLBIP = 'lbwithmultivip'
>> }

I 💙 PS> .\Deploy-AzResources.ps1 @param


Deployment is successful!


    View the code in GitHub  
Last modified: 21 August 2020

Share it on     |   |   |   | 
comments powered by Disqus