除了使用门户登入外,还可以使用PowerShell的方式来连接Azure。
首先要去下载组件

http://azure.microsoft.com/en-us/downloads/?rnd=1

http://www.windowsazure.cn/downloads/#cmd-line-tools

一个是国际版的,一个是国内版,工具版本相同。

通过Web Platform Installer 来集成安装其实会根据不同操作系统安装一些组件,以下是在Window 10下需要安装的部分

查看是否有这个module

PS C:\Windows\system32> Get-Module -ListAvailable Azure

    Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement

ModuleType Version    Name                                ExportedCommands
---------- ------- ---- ----------------
Manifest 0.8.11 Azure {Disable-AzureServiceProjectRemoteDesktop, Enable-AzureMem... PS C:\Windows\system32>

添加一个中国地区的Azure账号

add-azureaccount -Enviroment AzureChinaCloud

可以通过这样的方法来获取这个语句

PS C:\WINDOWS\system32> get-help add-AzureAccount -Examples
-------------------------- Example : Add an account in Azure China -------------------------- PS C:\>Add-AzureAccount -Environment AzureChinaCloud This command uses the Environment parameter to add an Azure China account to Windows PowerShell. When you run the
command, a windows pops up to request the user name and password of the account.

来查询到此句语句

添加一个国际版本的Azure账号

add-azureaccount

输入账号请保持全部小写。
获取添加的账号以及订阅信息。(SubscriptionId已删除)

PS C:\WINDOWS\system32> Get-AzureSubscription

SubscriptionId            :
SubscriptionName : MSDN
Environment : AzureCloud
SupportedModes : AzureServiceManagement,AzureResourceManager
DefaultAccount : anderson.ling@outlook.com
Accounts : {anderson.ling@outlook.com}
IsDefault : True
IsCurrent : True
CurrentStorageAccountName : SubscriptionId :
SubscriptionName : Pay
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Andreson@signalTips.partner.onmschina.cn
Accounts : {Andreson@signalTips.partner.onmschina.cn}
IsDefault : False
IsCurrent : False
CurrentStorageAccountName : SubscriptionId :
SubscriptionName : Free
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Ling@SHTriathlon.partner.onmschina.cn
Accounts : {Ling@SHTriathlon.partner.onmschina.cn}
IsDefault : False
IsCurrent : False
CurrentStorageAccountName :

可以根据这篇文章

http://www.cnblogs.com/threestone/p/4001943.html

修改订阅名称

可以获取当前订阅账户

PS C:\WINDOWS\system32> Get-AzureSubscription -Current

SubscriptionId            :
SubscriptionName : Free
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Ling@SHTriathlon.partner.onmschina.cn
Accounts : {Ling@SHTriathlon.partner.onmschina.cn}
IsDefault : False
IsCurrent : True
CurrentStorageAccountName :

可以通过来切换订阅账号SubscriptionName,SubscriptionId

PS C:\WINDOWS\system32> Select-AzureSubscription -SubscriptionName Pay
PS C:\WINDOWS\system32> Get-AzureSubscription -Current SubscriptionId :
SubscriptionName : Pay
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Andreson@signalTips.partner.onmschina.cn
Accounts : {Andreson@signalTips.partner.onmschina.cn}
IsDefault : False
IsCurrent : True
CurrentStorageAccountName :

国际版可以在一个订阅中添加中多个订阅,mooncake版本不开发此项功能

中国版 Azure 现提供 Azure Traffic Manager

http://blogs.msdn.com/b/azchina/archive/2014/10/13/azure-traffic-manager-in-azure-in-china.aspx

How to install and configure Azure PowerShell

http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/

使用PowerShell 连接Azure的更多相关文章

  1. PowerShell管理Azure

    PowerShell第一次连接Azure1.下载Azure SDK,安装azure powershell http://azure.microsoft.com/zh-cn/downloads/?rnd ...

  2. PowerShell 操作 Azure SQL Active Geo-Replication 实战

    <Azure SQL Database Active Geo-Replication简介>一文中,我们比较全面的介绍了 Azure SQL Database Active Geo-Repl ...

  3. PowerShell 连接SQL

    因为对SQL操作比较多,但有些操作其实都是重复性的,只是参数不太一样了,例如silo id, server name 等.希望可以通过powershell脚本提高效率. 尝试如下 1. 使用Power ...

  4. 本地git部署web连接azure的git存储库

    ​​​本地git部署web 创建本地存储仓库 输入以下命令创建git本地仓库(会在当前目录下生产一个.git的目录) git init 然后提交内容 在git仓库所在的目录下存放好需要的网页文件 将文 ...

  5. Windows 上安装 Azure PowerShell及Azure PowerShell部署虚拟机

    一.Azure PowerShell部署   1.使用 PowerShellGet 在 Windows 上安装 Azure PowerShell 从 Azure PowerShell 版本 6.0 开 ...

  6. 如何使用 Azure PowerShell 在 Azure Marketplace 中查找 Windows VM 映像

    本主题介绍如何使用 Azure PowerShell 在 Azure Marketplace 中查找 VM 映像. 创建 Windows VM 时使用此信息来指定 Marketplace 映像. 确保 ...

  7. PowerShell 操作 Azure SQL Active Geo-Replication

    前文中我们比较全面的介绍了 Azure SQL Database Active Geo-Replication 的主要特点和优势.接下来我们将从自动化的角度介绍如何通过 PowerShell 在项目中 ...

  8. PHP连接Azure Redis

    概述 Azure Redis缓存基于流行的开源Redis缓存,可以通过各种Redis客户端进行访问,这些客户端适用于许多编程语言.每个客户端有自身的API,用于通过Redis命令调用Redis缓存实例 ...

  9. 使用SAS令牌连接Azure EventHub

    概述 事件中心使用在命名空间和事件中心级别提供的共享访问签名.SAS令牌是从SAS密钥生成的,它是以特定格式编码的URL的SHA哈希. 事件中心可以使用密钥(策略)的名称和令牌重新生成哈希,以便对发送 ...

随机推荐

  1. leetcode 题解:Search in Rotated Sorted Array II (旋转已排序数组查找2)

    题目: Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would t ...

  2. cent os 6 安装 nginx

    cent os 6 默认的库是没有nginx的,所以直接 yum install nginx不行. 解决办法: $ wget http://nginx.org/packages/centos/6/no ...

  3. mysql-添加删除字段

    添加字段: -- 添加字段 -- ALTER TABLE tb_name ADD 字段名称 字段类型 [完整性约束条件] [FIRST|AFTER] -- 给user10添加card字段 ); -- ...

  4. PHP使用外部命令导出数据库,备份到服务器并下载到本地

    <?php // $dumpFileName目录要有可写权限 $DbHost = 'localhost'; $DbUser = 'root'; $DbPwd = '123456'; $DbNam ...

  5. hdu 3909 数独扩展

    思路:做法与9*9的一样.只不过是变量. #include<set> #include<map> #include<cmath> #include<queue ...

  6. ado模版不会自动生成

    从数据库中更新模版的时候,其他文件都更新了,只有tt文件下的cs文件是没有更新的,没有添加也没有修改,在网上找了很久都没有这方面的信息. 其实只要删掉,重建一个ado模版就好.根本就不需要纠结.最后还 ...

  7. 基础面试题——HTML/CSS

    1. 常用那几种浏览器测试?有哪些内核(Layout Engine)? (Q1)浏览器:IE,Chrome,FireFox,Safari,Opera. (Q2)内核:Trident,Gecko,Pre ...

  8. js中的相等与不等运算

    如果其中一个操作数的类型为 Boolean ,那么,首先将它转换为数字类型,false 转换为 0, true 将转换为 1. 如果其中一个操作数的类型是字符串,另外一个为数字类型,那么,将字符串转换 ...

  9. 基于jquery的inputlimiter 实现字数限制功能

    html代码: <td>内容摘要:</td> <td> <textarea id="content_summary" rows=5 nam ...

  10. UI3_UIView自动布局

    // // ViewController.m // UI3_UIView自动布局 // // Created by zhangxueming on 15/7/1. // Copyright (c) 2 ...