Last active
January 15, 2016 20:07
-
-
Save elringus/a025a92eaae265558ca2 to your computer and use it in GitHub Desktop.
A power shell scripts to batch-add end-points to an Azure VM.
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 | |
$vm = Get-AzureVM -ServiceName "example-service-name" -Name "example-vm-name" | |
for ($i=7000; $i -le 7100; $i++) | |
{ | |
$EndpointName = "EXAMPLE-" | |
$EndpointName += $i | |
Add-AzureEndpoint -Name $EndpointName -Protocol "udp" -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