通过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 类库调用自身所带的配置文件中的配置信息,而不是读取应用程序所带的配置信息.代码如下: ...
随机推荐
- 未知宽高图片水平垂直居中在div
<BODY> <div class="box"> <span class="car"></span> <i ...
- ionic2 App搭建(三)
cmd命令提示框中进入项目文件夹 运行命令 ionic serve --lab 结构如下图 这里数据是没有接受到的,是因为跨域的问题,解决方案是谷歌浏览器配置跨域指令如下: 配置chrome浏览器允 ...
- 深入理解ES6之—符号与符号属性
在js已有的基本类型(字符串,数值,布尔型,null和undefined)之外,es6引入了一种新的基本类型:==符号(Symbol)==.符号起初被设计用于创建对象私有成员. 符号没有字面量形式,你 ...
- MFC中属性表单和向导对话框的使用
每次在使用MFC创建一个框架时,需要一步步选择自己的程序的外观,基本功能等选项,最后MFC会生成一个基本的程序框架,这个就是向导对话框:而属性表单则是另外一种对话框,表单上有多个属性页,每点击某一页, ...
- 优雅的处理Redis访问超时
很长一段时间以来,一直在项目中使用Redis作为辅助存储,确切来说是利用Redis的内存存储,而不是将其作为缓存.比如常见的利用Set集合来判断某个数值是否存在,或者将来自不同请求的数据放在Redis ...
- ConstraintLayout知识记录
一.准备工作 1. 确保SDK Tools已经下载了ContraintLayout的支持库. 2. gradle中增加对ConstraintLayout的依赖. compile 'com.andr ...
- 【转载】OAuth2 流程
OAuth是一个关于授权(authorization)的开放网络标准,在全世界得到广泛应用,目前的版本是2.0版. 本文对OAuth 2.0的设计思路和运行流程,做一个简明通俗的解释,主要参考材料为R ...
- 线程池内的异步线程创建UI控件,造成UI线程卡死无响应的问题分析
winform应用在使用一段时间后,切换到其他系统或者打开word.excel文档,再切换回winform应用时,系统有时出现不响应的现象.有时在锁屏后恢复桌面及应用时也发生此问题. 经微软支持确认, ...
- 【转】Memory gates checking failed because the free memory***解决办法
Issue: Vault users cannot connect. VLOGS show the following error: Memory gates checking failed beca ...
- UVAlive 3708 Graveyard(最优化问题)
题目描述: 在周长10000的圆上,初始等距的放置着n个雕塑,现在新加入m个雕塑,要使得这n+m个雕塑仍然等距,问原来n个雕塑要移动的距离总和的最小值. 原题地址: http://acm.hust.e ...