Create Azure Internal Load Balancer using PowerShell


Input Parameters:

Subnets: Subnet_10.x.x.x
Resource Groups (Service Name): ServerGroup1
VMs: Server1, Server2
InternalLoadBalancerName: InternalLB1
Port: 443

Find the Subnets where you would like to create a internal load balancer.

Get-AzureVNetSite

Find the VMs which you would like to add to this internal load balancer

Get-AzureVM -ServiceName ServerGroup1

Create a Internal Network

Add-AzureInternalLoadBalancer -ServiceName ServerGroup1 -InternalLoadBalancerName InternalLB1 -SubnetName “Subnet_10.x.x.x” -StaticVNetIPAddress 10.x.x.x

Add VM to this network

Get-AzureVM -ServiceName ServerGroup1 -Name Server1 | Add-AzureEndpoint -LBSetName “InternalLB1” -Name “InternalLB1” -DefaultProbe -InternalLoadBalancerName “InternalLB1” -Protocol tcp -PublicPort 443 -LocalPort 443 -LoadBalancerDistribution sourceIP | Update-AzureVM

Add second VM to this network

Get-AzureVM -ServiceName ServerGroup1 -Name Server2 | Add-AzureEndpoint -LBSetName “InternalLB1” -Name “InternalLB1” -DefaultProbe -InternalLoadBalancerName “InternalLB1” -Protocol tcp -PublicPort 443 -LocalPort 443 -LoadBalancerDistribution sourceIP | Update-AzureVM

About Raihan Al-Beruni

My Name is Raihan Al-Beruni. I am working as an Infrastructure Architect in Data Center Technologies in Perth, Western Australia. I have been working on Microsoft technologies for more than 15 years. Other than Microsoft technologies I also work on Citrix validated solution and VMware data center virtualization technologies. I have a Masters degree in E-Commerce. I am certified in Microsoft, VMware, ITIL and EMC. My core focus is on cloud technologies. In my blog I share my knowledge and experience to enrich information technology community as a whole. I hope my contribution through this blog will help someone who wants more information on data center technologies.
Gallery | This entry was posted in Azure and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s