Windows Azure Virtual Machine (22)

來源:互聯網
上載者:User

使用Azure PowerShell,設定Virtual Machine Endpoint

我們可以通過Windows Azure Management Portal,開啟Virtual Machine的Endpoint,借用我之前博文的圖片:

但是如果我們需要開啟非常多的Endpoint, 就需要手動一個一個地設定,非常的繁瑣。

其實我們可以通過Windows Azure Powershell,來大量設定Virtual Machine的Endpoint。

1.假設已經建立完畢一台Vitual Machine,名稱為LeiSQLVM

2.我們使用管理員身份運行,運行Windows Azure Management Portal

3.如果你是第一次運行Azure PowerShell。我們要在本地建立認證檔案。以便本機電腦和Azure建立可靠的安全連線。

請參考筆者之前的博文:[New Portal]Windows Azure Virtual Machine (16) 使用Azure PowerShell建立Azure Virtual Machine

查看本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/

4.上傳認證完畢後,假設我們需要為LeiSQLVM這台虛擬機器設定TCP Endpoint

Endpoint Name為TCP80

Public Port為80

Public Port為80

5.我們回到Azure Powershell,繼續輸入以下命令

Get-AzureVM –ServiceName ‘LeiSQLVM’ –Name ‘LeiSQLVM’ | add-AzureEndpoint –Name ‘TCP80’ –Protocol ‘TCP’ –Publicport 80 –LocolPort 80 | Update-AzureVM 

運行完畢後,結果如下

6.在Management Portal裡查到設定結果:

7.筆者只是簡單介紹了下單台VM的Endpoint設定,如果要多台 VM設定Endpoint,請參考MSDN文章

http://msdn.microsoft.com/en-us/library/windowsazure/jj152886.aspx

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.