PS C:\WINDOWS\system32> Import-AzurePublishSettingsFile 'C:\Users\Ling\Desktop\Free-11-24-2014-credentials.publishsettin
gs' Id : 36b1bd18-6519-4ea5-8d90-5300a6915a25
Name : Free
Environment : AzureChinaCloud
Account : 5499B16B9FEC1DF8608CD
Properties : {[SupportedModes, AzureServiceManagement]} PS C:\WINDOWS\system32>

首先先参考如何使用add-azureaccount加入账户

http://www.cnblogs.com/SignalTips/p/4106248.html

这篇文章介绍了如何使用加入账号使用Powershell访问Azure。

假如有多个订阅,如何进行切换的,如何添加订阅,如何更改默认订阅。

1.如何切换不同订阅

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 :

如何获取订阅名称

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 : False
IsCurrent : False
CurrentStorageAccountName : SubscriptionId :
SubscriptionName : Pay
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Andreson@signalTips.partner.onmschina.cn
Accounts : {Andreson@signalTips.partner.onmschina.cn}
IsDefault : False
IsCurrent : True
CurrentStorageAccountName : SubscriptionId :
SubscriptionName : Free
Environment : AzureChinaCloud
SupportedModes : AzureServiceManagement
DefaultAccount : Ling@SHTriathlon.partner.onmschina.cn
Accounts : {Ling@SHTriathlon.partner.onmschina.cn,
}
IsDefault : True
IsCurrent : False
CurrentStorageAccountName :

2.如何添加订阅

先使用切换至需要获取订阅的账户,

PS C:\WINDOWS\system32> Select-AzureSubscription -SubscriptionName

使用以下命令,或切换至下载认证的网页

PS C:\WINDOWS\system32> Get-AzurePublishSettingsFile

下载完毕后使用以下方法导入证书

可以在设置下查看到以下信息

使用Powershell 添加,选择更改订阅的更多相关文章

  1. Azure PowerShell (2) 修改Azure订阅名称

    <Windows Azure Platform 系列文章目录> Update: 2016-01-11 笔者文档主要都是用Azure PowerShell 0.x版本来实现的,比如0.98版 ...

  2. Azure PowerShell (4) 使用PowerShell管理多个订阅

    <Windows Azure Platform 系列文章目录> 笔者手上有两个Azure账户. - Azure Global (windowsazure.com)账户.有两个订阅. - 世 ...

  3. DevExpress GridControl控件行内新增、编辑、删除添加选择框

    以下为内容以图片居多1234表示点击顺序 先新增一行 操作和新增数据行一样 打开ColumnEdit  选择new ButtenEdit  new上方会出现一个系统命名的button 命名可以更改必须 ...

  4. PowerShell添加或修改注册表开机启动项脚本

    代码如下: $name = Read-Host "请输入开机启动项的名字(随便起)" $value = Read-Host "请输入开机启动项的值" try{ ...

  5. 动态添加和更改F7编辑器(div和editGrid列)

    //更改列编辑器 waf("#editGrid").wafGrid("setColumnConfig", "settlementType", ...

  6. PowerShell添加和部署WSP

    SharePoint PowerShell在SharePoint Product列表里边,然后以管理员权限启动. 1. 添加Solution 到 SharePoint Farm. Add-SPSolu ...

  7. Powershell对象选择,排序和变量存储

    PowerShell基础教程(17)——对象的选择.排序和变量存储 可以使用 Select-Object cmdlet 来创建新的.自定义的 Windows PowerShell 对象,后者包含的属性 ...

  8. js 左侧树添加选择样式

    选择样式添加 menuToggle: function() { var menus = $('.nav-primary').children('li'); var tog = menus.has('. ...

  9. 向Array中添加选择排序

    选择排序思路 在无序区中选出最小的元素,然后将它和有序区的第一个元素交换位置. 选择排序实现 Function.prototype.method = function(name, func){ thi ...

随机推荐

  1. Eclipse 修改debug当前行的颜色

    window --preferences--general--editors--text editors--annotations--debug current instruction pointer

  2. Hadoop集群(第4期)_SecureCRT使用

    1.SecureCRT简介 SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,同时支持Telnet和rlogin协议.SecureCRT是一款用于连接运行包括Windows.UN ...

  3. 【Python】如何安装easy_install?

    [Python]如何安装easy_install? http://jingyan.baidu.com/article/b907e627e78fe146e7891c25.html easy_instal ...

  4. Python3 学习第六弹: 迭代器与生成器

    1> 迭代器 迭代的意思类似递归一般,不断地对一个对象做重复的操作.来看个例子: class Fibs: def __init__(self): self.last = self.now = 1 ...

  5. c#调用系统资源大集合-3

    public static void 打开控制面板多媒体属性音频() { Process.Start("rundll32.exe", " shell32.dll,Cont ...

  6. UVa 10391 (水题 STL) Compound Words

    今天下午略感无聊啊,切点水题打发打发时间,=_=|| 把所有字符串插入到一个set中去,然后对于每个字符串S,枚举所有可能的拆分组合S = A + B,看看A和B是否都在set中,是的话说明S就是一个 ...

  7. Linux查看CPU信息

    1.  查看物理CPU的个数 #cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc –l 2.   查看逻辑CPU的个数 #ca ...

  8. OE中admin的内置帐号

    在OE中admin的内置帐号为SUPERUSER_ID,可以用来直接做判断登录用户是否admin from openerp import SUPERUSER_ID if uid == SUPERUSE ...

  9. HDU 5268 ZYB loves Score (简单模拟,水)

    题意:计算Bestcoder四题的得分. 思路:直接模拟,4项分数直接计算后输出.注意不要低于百分之40的分. //#include <bits/stdc++.h> #include &l ...

  10. mysql应用存储过程批量插入数据

    --批量插入数据的sql语句 delimiter $$ DROP PROCEDURE IF EXISTS `test.sp_insert_batch` $$ CREATE DEFINER =`root ...