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虚拟机的配置信息的更多相关文章

  1. Azure CLI对ASM,ARM资源的基本操作

    本文主要介绍Windows Azure CLI对ASM及ARM资源的基本操作 1.在windows的CMD或Powershell环境下,输入命令:azure,可以查看到当前操作的模式为ASM还是ARM ...

  2. Azure Powershell对ASM资源的基本操作

    本文主要介绍Windows Azure Powershell对ASM资源的基本操作 1.登陆ASM模式,命令:Add-AzureAccount -Environment AzureChinaCloud ...

  3. .NetCore获取Json和Xml格式的配置信息

    本篇将和大家分享的是:如何获取Json和Xml格式的配置信息,主要介绍的是Configuration扩展方法的使用,因为netcore的web应用在Startup中已经默认嵌入appsettings. ...

  4. Azure Powershell获取指定订阅下的虚拟机信息(ARM)

    为方便Azure用户导出已创建虚拟机的相关信息,特编写如下脚本: 详情脚本: # 登陆Azure Account Add-AzureRmAccount -EnvironmentName AzureCh ...

  5. Azure Powershell获取指定订阅下的虚拟机信息(ASM)

    为方便Azure用户导出已创建虚拟机的相关信息,特编写如下脚本: 详情脚本: # 登陆Azure Account Add-AzureAccount -Environment AzureChinaClo ...

  6. 使用 Azure PowerShell 监视和更新 Windows 虚拟机

    Azure 监视使用代理从 Azure VM 收集启动和性能数据,将此数据存储在 Azure 存储中,并使其可供通过门户.Azure PowerShell 模块和 Azure CLI 进行访问. 使用 ...

  7. azure powershell 获取可用镜像列表

    通过Azure Powershell 指定location和Pbulishername 获取所有可用镜像的 publisherName,Offer,Skus,Version,location信息列表 ...

  8. Azure PowerShell (一)如何安装和配置 Azure PowerShell

    什么是 Azure PowerShell? Azure PowerShell 是一组模块,提供用于通过 Windows PowerShell 管理 Azure 的 cmdlet.你可以使用 cmdle ...

  9. 类库从自带的配置文件中获取信息(DLL文件 获取 DLL文件自带的配置信息) z

    http://blog.csdn.net/shuaishifu/article/details/19602059 类库调用自身所带的配置文件中的配置信息,而不是读取应用程序所带的配置信息.代码如下: ...

随机推荐

  1. nodejs 之 nvm和pm2

    说道 node不得不提到nodejs的版本管理nvm和Node应用的进程管理器pm2. 当然,关于这两个的介绍的文章那么多,随意baidu,bing,google就可以. 我这里是给自己打一个标签,方 ...

  2. form注册表单圆角 demo

    form注册表单圆角 <BODY> <div class="form"> <ul class="list"> <li& ...

  3. 内核,配置WinDbg,调试操作系统(双机调试)

    配置WinDbg,调试操作系统(双机调试) PS: 设置双机调试之前,请先安装虚拟机,并且安装好XP系统.这里不做演示.直接设置. 一丶WinDbg的设置 1) 配置WinDbg的环境,在path变量 ...

  4. 关于pocsuite的使用

    0x00 前言 pocsuite的用处就不多说了,早些时候也看到黑哥和余弦大佬在微博上说zoomeye 和pocsuite升级了. 结合最近自己在审计cms,也想收集一下其他cms的poc,比如chy ...

  5. 基于FPGA驱动VGA显示图片的小问题

    学习VGA显示图片的过程中,遇到了一个小问题,我在显示屏上开了一个60x60的框,放了一张图片进去显示,但是最终的结果如下图所示. 出现了一个竖黑边,看了看代码,分析了一下逻辑没问题,然而看这个显示那 ...

  6. 关于 AutomationProperties.Name 的一些总结

    在 XAML 代码中,我们偶尔会看到 AutomationProperies 的代码,如 AutomationProperties.Name="xxxxx", Automation ...

  7. 开发 | 微信小程序API-wx.setScreenBrightness/wx.getScreenBrightness

    前言 最近接触了微信小程序 API - wx.setScreenBrightness .wx.getScreenBrightness 接口,调用该接口可以调节并显示手机屏幕亮度数据.对于喜欢腾讯新闻. ...

  8. deeplearning.ai 人工智能行业大师访谈 Ruslan Salakhutdinov 听课笔记

    Ruslan Salakhutdinov一方面是苹果的研究主管,另一方面是CMU的教授. 1. Ruslan说自己进入深度学习完全是运气,他在多伦多大学读硕士,然后休学了一年,他在金融领域工作,那时候 ...

  9. JavaScript call()和apply()

    ECMAScript规范给所有函数都定义了call()与apply()两个方法,call()与apply()的第一个参数都是需要调用的函数对象,在函数体内这个参数就是this的值,剩余的参数是需要传递 ...

  10. AtCoder Beginner Contest 069【A,水,B,水,C,数学,D,暴力】

    A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, ...