Created
August 14, 2014 07:01
-
-
Save astaykov/22fd38e3593bbf273329 to your computer and use it in GitHub Desktop.
Azure IaaS PowerShell bulk add endpoints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-AzureAccount | |
Select-AzureSubscription -SubscriptionName "Your_Subscription_Name" | |
$vm = Get-AzureVM -ServiceName "CloudServiceName" -Name "VM_Name" | |
for ($i=6100; $i -le 6120; $i++) | |
{ | |
$EndpointName = "FtpEndpoint_" | |
$EndpointName += $i | |
Add-AzureEndpoint -Name $EndpointName -Protocol "tcp" -PublicPort $i -LocalPort $i -VM $vm | |
} | |
$vm | Update-AzureVM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment