Azure powershell 搭建
一、下载powershell程序:
http://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/
http://jackwebwinsto.blob.core.chinacloudapi.cn/tmp/azure-powershell.4.1.0.msi
二、导入订阅
1、Powershell是新安装的,可能默认指向了Azure国际。您可能需要让Powershell指向Azure中国订阅
https://manage.windowsazure.cn/publishsettings/index 下载PublishSettingFile
.网页登录中国Azure后,在浏览器中直接输入以下链接,就可获得publishsettingsfile:
https://manage.windowsazure.cn/publishsettings/index?client=powershell
导入下载的PublishsettingFile
import-azurepublishsettingsfile D:\提前支付-4-28-2015-credentials.publishsettings
三、查看基本信息
1、从浏览器登录:
GetGet-AzurePublishSettingsFile -Environment AzureChinaCloud
2、获取当前的默认订阅
Get-AzureSubscription -Default
查看powershell的版本
(get-module azure).version
3.更改当前的默认订阅
Select-AzureSubscription -SubscriptionName 订阅名字(2中的订阅名字)