D
D
Dmitry Luponos2015-05-11 13:41:23
PowerShell
Dmitry Luponos, 2015-05-11 13:41:23

MS Azure: port group opening script. Who will help?

https://msdn.microsoft.com/library/azure/dn376543.aspx
here it is written how to open ports with a script on a VM in Azure. It doesn't work for us.
The task is to open ports 10000-12000 via UDP

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nikitin, 2015-05-11
@Bessome

The link you provided is not what you need. The correct script would be something like this:

#выбираем нужную подписку
Get-AzureSubscription | Select-AzureSubscription

#выбираем нужную ВМ
$vm = Get-AzureVm -Name "you vm name" -ServiceName "you vm service name"

#ВНИМАНИЕ! Следующий код выполнится 2000 раз! Данный код добавляет конечные точки открывающие порты utp с 10000 по 12000.
10000..12000 | %{Add-AzureEndpoint -Name "Open port $_" -Protocol udp -LocalPort $_ -PublicPort $_ -VM $vm | Update-AzureVM}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question