PowerShell连接中国Azure

由于China Azure与Global Azure属于不同的服务,适用于Global Azure的命令并不完全适用于China Azure。目前,Add-AzureAccount命令地址指向Global,我们可以通过Import-AzurePublishSettingsFile命令连接China Azure。

具体步骤如下:

1. 从官网下载页面,下载并安装Windows Azure PowerShell: http://www.windowsazure.cn/zh-cn/downloads/#cmd-line-tools

2. 安装完毕后以管理员身份运行,右键点击PowerShell图标然后选择以管理员身份运行;

3. 执行命令Get-AzurePublishSettingsFile -Environment "AzureChinaCloud",通过打开的页面下载您的Windows Azure Subscription的发布配置文件;

clip_image001

4. 在PowerShell中执行Import-AzurePublishSettingsFile “发布配置文件本地存放路径”;

clip_image002

原文地址:https://www.cnblogs.com/duanweishi/p/4172841.html