Azure Powershell对ASM资源的基本操作
本文主要介绍Windows Azure Powershell对ASM资源的基本操作
1.登陆ASM模式,命令:Add-AzureAccount -Environment AzureChinaCloud
2.获取订阅信息,命令:Get-AzureSubscription
3.设置指定的操作订阅及指定的存储账号,命令:
Set-AzureSubscription -SubscriptionId “******” -CurrentStorageAccountName “******”
Select-AzureSubscription -SubscriptionId "******" -Current
4.查看默认的操作订阅或当前的操作订阅,命令:
Get-AzureSubscription -Current
Get-AzureSubscription -Default
5.获取虚拟机的信息,命令:Get-AzureVM
6.获取存储账号的信息,命令:Get-AzureStorageAccount
7.获取自动化服务的信息,命令:Get-AzureAutomationAccount
8.查询一个陌生的操作命令,示例:get-command get-azurev*
9.获取指定命令的操作手册,示例:Get-Help Get-AzureAutomationAccount -Full
备注:
a.有时安装完Windows Azure Powershell会出现一种比较奇怪的现象,确认已经成功安装了,命令也可以使用Tab键自动补齐,但没有相应的显示参数信息,例如:
PS C:\Users\stone> get-help Add-AzureAccount -full 名称
Add-AzureAccount 语法 参数
无 输入
无 输出
System.Object 别名
无 备注
无
b.出现上述情况后,需要将Azure模块导入当前操作的Powershell,命令:Import-Module -Name Azure;并可以查看当前Powershell所拥有的模块,命令:Get-Module
PS C:\Users\stone> Import-Module -Name Azure
PS C:\Users\stone> Get-Module ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 4.3.1 Azure {Add-AzureAccount, Add-AzureApplicationGatewaySslCertificate, Add-AzureCertificate, Add-AzureDataDisk...}
Manifest 3.3.1 Azure.Storage {Get-AzureStorageBlob, Get-AzureStorageBlobContent, Get-AzureStorageBlobCopyState, Get-AzureStorageContainer...}
Manifest 3.3.1 AzureRM.Profile {Add-AzureRmAccount, Add-AzureRmEnvironment, Disable-AzureRmDataCollection, Enable-AzureRmDataCollection...}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
c.再次运行预操作的命令,可以成功获取到其参数
PS C:\Users\stone> Add-AzureAccount -Environment AzureChinaCloud Id Type
-- ----
WATSTest03@MicrosoftInternal.partner.onmschina.cn User PS C:\Users\stone> get-help Add-AzureAccount -full 名称
Add-AzureAccount 摘要
Adds the Azure account to Windows PowerShell 语法
Add-AzureAccount [-Environment <String>] [-Credential <PSCredential>] [-Profile <AzureProfile>] [<CommonParameters>] Add-AzureAccount [-Environment <String>] [-Credential <PSCredential>] -ServicePrincipal [<SwitchParameter>] -Tenant <String> [-Profile <AzureProfile>] [<CommonParameters>]
Azure Powershell对ASM资源的基本操作的更多相关文章
- Azure Powershell对ARM资源的基本操作
本分主要介绍Windows Azure Powershell对ARM资源的基本操作 1.登陆ARM模式,命令:Login-AzureRmAccount -EnvironmentName AzureCh ...
- 通过Azure Powershell获取asm及arm虚拟机的配置信息
1.asm虚拟机可以使用类似如下Azure Powershell命令获取虚拟机的基本信息,包括发行版本,虚拟机名称及size[备注:虚拟机需要是使用平台image创建的] PS C:\Users\he ...
- 使用 Azure PowerShell 将 IaaS 资源从经典部署模型迁移到 Azure Resource Manager
以下步骤演示了如何使用 Azure PowerShell 命令将基础结构即服务 (IaaS) 资源从经典部署模型迁移到 Azure Resource Manager 部署模型. 也可根据需要通过 Az ...
- Azure RBAC管理ASM资源
上一篇文章介绍了Azure基于ARM的RBAC,给不同的用户分配不同的权限. 但目前在国内使用的大部分用户还是以ASM的资源为主.比如:VM.Storage.Network.WebAPP.SQL Az ...
- Azure CLI对ASM,ARM资源的基本操作
本文主要介绍Windows Azure CLI对ASM及ARM资源的基本操作 1.在windows的CMD或Powershell环境下,输入命令:azure,可以查看到当前操作的模式为ASM还是ARM ...
- Azure PowerShell (14) 批量导出Azure ASM ACL和ARM NSG配置信息
<Windows Azure Platform 系列文章目录> 最近有一个客户需求,需要批量导出Azure Classic VM的ACL (Access Control List), 还有 ...
- Azure PowerShell 1.0.0以上版本在中国Azure使用的注意事项
随着Azure PowerShell 1.0.0+的推出,越来越多的客户开始使用新的版本的Azure PowerShell.此版本的PowerShell最大的改变在于将原先的Switch-AzureM ...
- 使用 Azure CLI 将 IaaS 资源从经典部署模型迁移到 Azure Resource Manager 部署模型
以下步骤演示如何使用 Azure 命令行接口 (CLI) 命令将基础结构即服务 (IaaS) 资源从经典部署模型迁移到 Azure Resource Manager 部署模型. 本文中的操作需要 Az ...
- Azure PowerShell (一)如何安装和配置 Azure PowerShell
什么是 Azure PowerShell? Azure PowerShell 是一组模块,提供用于通过 Windows PowerShell 管理 Azure 的 cmdlet.你可以使用 cmdle ...
随机推荐
- K:Union-Find(并查集)算法
相关介绍: 并查集的相关算法,是我见过的,最为之有趣的算法之一.并查集是一种树型的数据结构,用于处理一些不相交集合(Disjoint Sets)的合并及查询问题.其相关的实现代码较为简短,实现思想也 ...
- windows系统操作
1.怎么更新补丁 有些软件的运行需要windows要安装相关的补丁,除了去微软官网下载补丁外,可以用windows自带的“系统更新”来完成,省去找补丁下载以及研究系统缺少哪些补丁. 控制面板--> ...
- python 学习源码练习(1)
#编译方式,python3 文件名 #!/usr/bin/python3#print('hello world') mystring = 'hello world'print (mystring) # ...
- 如何处理Cookie存储和读取中文乱码问题
存储Cookie for(String str:books){ str=new String(str.getBytes("ISO-8859-1"),"utf-8" ...
- DeepLearning.ai学习笔记(四)卷积神经网络 -- week3 目标检测
一.目标定位 这一小节视频主要介绍了我们在实现目标定位时标签该如何定义. 上图左下角给出了损失函数的计算公式(这里使用的是平方差) 如图示,加入我们需要定位出图像中是否有pedestrian,car, ...
- iptables网络安全服务详细使用
iptables防火墙概念说明 开源的基于数据包过滤的网络安全策略控制工具. centos6.9 --- 默认防火墙工具软件iptables centos7 --- 默认防火墙工具软件fire ...
- 14、ABPZero系列教程之拼多多卖家工具 新建微信公众号模块
说是模块,其实在MVC中就是区域,新建一个区域专门管理整个微信功能. Web项目新建区域 在Web项目Areas目录下新建一个区域,名称为“Weixin",如下图: 接着打开web.conf ...
- HDU5135 dfs搜索 枚举种数
Little Zu Chongzhi's Triangles Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 ...
- BASH 学习笔记小结
1. Linux 脚本编写基础 1.1 语法基本介绍 1.1.1 开头 程序必须以下面的行开始(必须方在文件的第一行): #!/bin/sh 符号#!用来告诉系统它后面的参数是用来执行该文件的程序.在 ...
- MVC学习笔记(分享)
一.SpringMVC基础入门,创建一个HelloWorld程序 1.首先,导入SpringMVC需要的jar包. 2.添加Web.xml配置文件中关于SpringMVC的配置 <!--conf ...