使用 Windows PowerShell 來管理和開發 windowsazure.cn 賬戶的特別注意事項

來源:互聯網
上載者:User

標籤:des   http   ar   io   os   使用   sp   on   檔案   

6月6日,微軟面向中國大陸使用者開放了Microsoft Azure公眾預覽版的申請介面。大家可以申請免費的 beta 試用,收到內附邀請碼的通知訊息後只需輸入啟用碼即可開始免費試用。具體網址為:

http://windowsazure.cn/zh-cn/pricing/free-trial/

在實際使用這個帳號的時候,發現有一些地方需要特別注意。

在使用PowerShell工具中,需要下載發行設定檔(PublishSettingProfile),從而獲得設定Windows PowerShell環境的變數。具體方法是登入Microsoft Azure賬戶的管理入口網站後,訪問下面地址即可獲得:https://windows.azure.com/download/publishprofile.aspx

關於這一操作的說明具體請見:

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

但是在使用Windowsazure.cn的帳號的時候,發現無法通過上述方法得到PublishSettingProfile。

經瞭解,需要到下述地址來獲得:

https://manage.windowsazure.cn/publishsettings/index

下載後進行對比,發現兩者檔案格式上有些差異。

通過https://windows.azure.com/download/publishprofile.aspx,獲得格式範例如下:

  
<?xml version="1.0" encoding="utf-8"?>    <PublishData>        <PublishProfile                PublishMethod="AzureServiceManagementAPI"                Url="https://management.core.windows.net/"                ManagementCertificate="{Subscription’s management certificate}”             <Subscription                Id="{Subscription’s ID} "                Name="{Subscription’s Name} " />        </PublishProfile>    </PublishData>

而在https://manage.windowsazure.cn/publishsettings/index下載的檔案格式為:

  
<?xml version="1.0" encoding="utf-8"?>        <PublishData>            <PublishProfile                     SchemaVersion="2.0"                     PublishMethod="AzureServiceManagementAPI">                     <Subscription                                ServiceManagementUrl="https://management.core.chinacloudapi.cn"                                Id="{Subscription’s ID}"                                Name="{Subscription’s Name} "                                ManagementCertificate="{Subscription’s management certificate}" />            </PublishProfile>        </PublishData>

同時,建議訪問https://github.com/WindowsAzure/azure-sdk-tools,擷取最新的Microsoft Azure Powershell,這樣在使用命令列Import-AzurePublishSettingsFile的時候,不易發生錯誤。

使用 Windows PowerShell 來管理和開發 windowsazure.cn 賬戶的特別注意事項

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.