通过Azure Powershell获取asm及arm虚拟机的配置信息
1.asm虚拟机可以使用类似如下Azure Powershell命令获取虚拟机的基本信息,包括发行版本,虚拟机名称及size【备注:虚拟机需要是使用平台image创建的】
PS C:\Users\he.liming> $vm = Get-AzureVM -ServiceName hlmcla12r2n5c12617 -Name hlmclakey73n1
PS C:\Users\he.liming> $vm.VM.OSVirtualHardDisk
HostCaching : ReadWrite
DiskLabel :
DiskName : hlmcla69n3-hlmclakey73n1-0-201709251058520037
MediaLink : https://hlmstoragen.blob.core.chinacloudapi.cn/vhds/hlmcla12r2n5c12617-hlmclakey73n1-2017-09-25.vhd
SourceImageName : f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-73-20170707
OS : Linux
IOType : Standard
ResizedSizeInGB :
ExtensionData : PS C:\Users\he.liming> $vm.VM.RoleName
hlmclakey73n1
PS C:\Users\he.liming> $vm.VM.RoleSize
Medium
2.arm虚拟机可以使用类似如下Azure Powershell命令获取虚拟机的基本信息,包括发行版本,虚拟机名称及size【备注:虚拟机需要是使用平台的image创建的】
PS C:\Users\he.liming> $vm = Get-AzureRmVM -ResourceGroupName hlmrgn -Name hlmcen69n1
PS C:\Users\he.liming> $vm.StorageProfile.ImageReference
Publisher : OpenLogic
Offer : CentOS
Sku : 6.9
Version : latest
Id : PS C:\Users\he.liming> $vm.StorageProfile.OsDisk
OsType : Linux
EncryptionSettings :
Name : hlmcen69n1
Vhd : Microsoft.Azure.Management.Compute.Models.VirtualHardDisk
Image :
Caching : ReadWrite
CreateOption : FromImage
DiskSizeGB : 30
ManagedDisk : PS C:\Users\he.liming> $vm.HardwareProfile
VmSize
------
Standard_A1 PS C:\Users\he.liming> $vm.Name
hlmcen69n1
3.可以使用“gm”【Get-Member】参数查看当前变量的方法及属性
PS C:\Users\he.liming> $vm | gm TypeName: Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleContext Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetInstance Method Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM GetInstance(), Microsoft.WindowsAzure.Commands.ServiceManagement.Model.
GetType Method type GetType()
ToString Method string ToString()
AvailabilitySetName Property string AvailabilitySetName {get;set;}
DeploymentName Property string DeploymentName {get;set;}
DNSName Property string DNSName {get;set;}
GuestAgentStatus Property Microsoft.WindowsAzure.Commands.ServiceManagement.Model.GuestAgentStatus GuestAgentStatus {get;set;}
HostName Property string HostName {get;set;}
InstanceErrorCode Property string InstanceErrorCode {get;set;}
InstanceFaultDomain Property string InstanceFaultDomain {get;set;}
InstanceName Property string InstanceName {get;set;}
InstanceSize Property string InstanceSize {get;set;}
InstanceStateDetails Property string InstanceStateDetails {get;set;}
InstanceStatus Property string InstanceStatus {get;set;}
InstanceUpgradeDomain Property string InstanceUpgradeDomain {get;set;}
IpAddress Property string IpAddress {get;set;}
Label Property string Label {get;set;}
MaintenanceStatus Property Microsoft.WindowsAzure.Commands.ServiceManagement.Model.MaintenanceStatus MaintenanceStatus {get;set;}
Name Property string Name {get;set;}
NetworkInterfaces Property Microsoft.WindowsAzure.Commands.ServiceManagement.Model.NetworkInterfaceList NetworkInterfaces {get;set;}
OperationDescription Property string OperationDescription {get;set;}
OperationId Property string OperationId {get;set;}
OperationStatus Property string OperationStatus {get;set;}
PowerState Property string PowerState {get;set;}
PublicIPAddress Property string PublicIPAddress {get;set;}
PublicIPDomainNameLabel Property string PublicIPDomainNameLabel {get;set;}
PublicIPFqdns Property System.Collections.Generic.List[string] PublicIPFqdns {get;set;}
PublicIPName Property string PublicIPName {get;set;}
RemoteAccessCertificateThumbprint Property string RemoteAccessCertificateThumbprint {get;set;}
ResourceExtensionStatusList Property System.Collections.Generic.List[Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ResourceExtensionStatus] ResourceExtensionStatusList
ServiceName Property string ServiceName {get;set;}
Status Property string Status {get;set;}
VirtualNetworkName Property string VirtualNetworkName {get;set;}
VM Property Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM VM {get;set;}
通过Azure Powershell获取asm及arm虚拟机的配置信息的更多相关文章
- Azure CLI对ASM,ARM资源的基本操作
本文主要介绍Windows Azure CLI对ASM及ARM资源的基本操作 1.在windows的CMD或Powershell环境下,输入命令:azure,可以查看到当前操作的模式为ASM还是ARM ...
- Azure Powershell对ASM资源的基本操作
本文主要介绍Windows Azure Powershell对ASM资源的基本操作 1.登陆ASM模式,命令:Add-AzureAccount -Environment AzureChinaCloud ...
- .NetCore获取Json和Xml格式的配置信息
本篇将和大家分享的是:如何获取Json和Xml格式的配置信息,主要介绍的是Configuration扩展方法的使用,因为netcore的web应用在Startup中已经默认嵌入appsettings. ...
- Azure Powershell获取指定订阅下的虚拟机信息(ARM)
为方便Azure用户导出已创建虚拟机的相关信息,特编写如下脚本: 详情脚本: # 登陆Azure Account Add-AzureRmAccount -EnvironmentName AzureCh ...
- Azure Powershell获取指定订阅下的虚拟机信息(ASM)
为方便Azure用户导出已创建虚拟机的相关信息,特编写如下脚本: 详情脚本: # 登陆Azure Account Add-AzureAccount -Environment AzureChinaClo ...
- 使用 Azure PowerShell 监视和更新 Windows 虚拟机
Azure 监视使用代理从 Azure VM 收集启动和性能数据,将此数据存储在 Azure 存储中,并使其可供通过门户.Azure PowerShell 模块和 Azure CLI 进行访问. 使用 ...
- azure powershell 获取可用镜像列表
通过Azure Powershell 指定location和Pbulishername 获取所有可用镜像的 publisherName,Offer,Skus,Version,location信息列表 ...
- Azure PowerShell (一)如何安装和配置 Azure PowerShell
什么是 Azure PowerShell? Azure PowerShell 是一组模块,提供用于通过 Windows PowerShell 管理 Azure 的 cmdlet.你可以使用 cmdle ...
- 类库从自带的配置文件中获取信息(DLL文件 获取 DLL文件自带的配置信息) z
http://blog.csdn.net/shuaishifu/article/details/19602059 类库调用自身所带的配置文件中的配置信息,而不是读取应用程序所带的配置信息.代码如下: ...
随机推荐
- 【Python3之正则re】
一.正则re 1.正则表达式定义 正则就是用一些具有特殊含义的符号组合到一起(称为正则表达式)来描述字符或者字符串的方法.或者说:正则就是用来描述一类事物的规则.(在Python中)它内嵌在Pytho ...
- 北漂的IT人
北京的互联网人,是工作日完全没有个人生活的一类人,也是整个北漂大队伍中,下班时间最晚的那一波人,如果赶上周末还要加班,那毫不夸张地说,你的整个人生都在互联网上奋斗着. 虽说十点上班让多少行内外的人羡慕 ...
- @EnableAsync annotation metadata was not injected
[问题描述] @EnableAsync annotation metadata was not injected spring配置初始化时候报错 nested exception is java.la ...
- 在树莓派上编译安装golang环境
请看我在掘金的文章
- 如何使用webapi集成swagger
现在B/S开发中,前后端分离无疑已经成为一种新的时尚,但是如何把后端开发的接口更好的提供给前段开发呢?还用接口文档?low了吧.不仅要花时间开发接口,还得花时间写文档,白花花的时间不久浪费了吗.如果接 ...
- ARM非对齐操作异常解决过程
在测试MF固件时,发生一个非常诡异的异常,代码如下: CLR_DBG_Commands::Monitor_EraseMemory* cmd = (CLR_DBG_Commands::Monitor_E ...
- js 跨域问题 汇总
前言 相信每一个前端er对于跨域这两个字都不会陌生,在实际项目中应用也是比较多的.但跨域方法的多种多样实在让人目不暇接.老规矩,碰到这种情况,就只能自己总结一篇博客,作为记录. 正文 1. 什么是跨域 ...
- Node.js学习笔记(三): 事件机制
大部分的nodejs核心api都建立在异步的事件驱动架构之上,所以events是Node.js 最重要的模块,它提供了唯一的接口.events 模块不仅用于用户代码与 Node.js 下层事件循环的交 ...
- Django源码分析之程序执行入口分析
一般我们开启一个django项目,最简单的方法是进入project 目录,这时目录结构是这样的 然后我们执行python manage.py runserver,程序就开始执行了. 那django是如 ...
- Haproxy原理(1)
一.四层和七层负载均衡的区别 所谓的四层就是ISO参考模型中的第四层.四层负载均衡也称为四层交换机,它主要是通过分析IP层及TCP/UDP层的流量实现的基于IP加端口的负载均衡.常见的基于四层的负载均 ...