Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

1、打开 http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/?rnd=1,点击"MiCrosoft Web Platform Installer",首先下载Web Platform

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

2、安装Web Platform,并下载PowerShell

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

3、打开PowerShell,下载Azure用户证书

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

在这里说明下:

 

方法一: 使用CmdText
Parameter Set: Default
Get-AzurePublishSettingsFile [[-Realm] <String> ] [ <CommonParameters>]

Get-AzurePublishSettingsFile —Global 这个是全球Azure账户通用的命令,在这里并不适合中国的试用账户,但是有MSDN订阅的是可以使用这个命令

在中国可以使用如下命令

Get-AzurePublishSettingsFile -Environment AzureChinaCloud

在PowerShell中输入“Get-AzurePublishSettingsFile -Environment AzureChinaCloud”  然后点击Enter键,然后就会跳出登录的页面,登录后就会自动下载证书,

 

方法二:直接使用连接下载

首先登录Azure的web控制平台,然后直接点击 https://manage.windowsazure.cn/publishsettings/  该连接下载证书

 

 

证书可以放在C盘根目录,这样方便在导入的时候写完整路径

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

 

4、导入证书

Import-AzurePublishSettingsFile 文件路径

eg: Import-AzurePublishSettingsFile C:\credentials.publishsettings

Windows Azure Platform 系列文章,第一章 使用Azure PowerShell 连接Azure

如果你出现了如上提示,那么恭喜你,你已经成功连接上了你的Azure了,剩下的操作,只要根据Azure PowerShell cmdText 的命令执行就ok了

 

相关文档:

http://www.windowsazure.cn/zh-cn/develop/python/how-to-guides/powershell-cmdlets/

http://msdn.microsoft.com/zh-cn/library/azure/jj554332.aspx

 

转载于:https://www.cnblogs.com/jesn/articles/4227187.html