Skip to content

Instantly share code, notes, and snippets.

@andreaswasita
Created July 28, 2014 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreaswasita/9c4bdfdbcf66fbfaf666 to your computer and use it in GitHub Desktop.
Save andreaswasita/9c4bdfdbcf66fbfaf666 to your computer and use it in GitHub Desktop.
$svc="azsedb"
$ilb="sqlilb"
$subnet="Azure-BackEnd"
$IP="10.0.1.100"
Add-AzureInternalLoadBalancer –ServiceName $svc -InternalLoadBalancerName $ilb –SubnetName $subnet –StaticVNetIPAddress $IP
$prot="tcp"
$locport=1433
$pubport=1433
$epname="LOB1"
$vmname="azsedb001"
Get-AzureVM –ServiceName $svc –Name $vmname | Add-AzureEndpoint -Name $epname -Protocol $prot -LocalPort $locport -PublicPort $pubport –DefaultProbe -InternalLoadBalancerName $ilb | Update-AzureVM
$epname="LOB2"
$vmname="azsedb002"
Get-AzureVM –ServiceName $svc –Name $vmname | Add-AzureEndpoint -Name $epname -Protocol $prot -LocalPort $locport -PublicPort $pubport –DefaultProbe -InternalLoadBalancerName $ilb | Update-AzureVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment