Skip to content

Instantly share code, notes, and snippets.

@win2000b
Created January 3, 2017 09:46
Show Gist options
  • Save win2000b/f400d22dda4ff568032492ec749603ae to your computer and use it in GitHub Desktop.
Save win2000b/f400d22dda4ff568032492ec749603ae to your computer and use it in GitHub Desktop.
Add Port Range to Azure Load Balancer
$VM = Get-AzureVM -ServiceName "cloudservicename" -Name "VirtualMachineName"
for ($Port = 6000; $Port -le 6100; $Port++)
{
$VM = $VM | Add-AzureEndpoint -Name "FTP-Pasv-$Port" -Protocol 'TCP' -LocalPort $Port -PublicPort $Port
}
$VM | Update-AzureVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment