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. Nginx 解决WebApi跨域二次请求以及Vue单页面问题

    一.前言 由于项目是前后端分离,API接口与Web前端 部署在不同站点当中,因此在前文当中WebApi Ajax 跨域请求解决方法(CORS实现)使用跨域处理方式处理而不用Jsonp的方式. 但是在一 ...

  2. Redis学习笔记(一)关于在windows64位环境下的安装学习使用

    前言 由于工作需要,目前我正在学习使用Redis.我当时学习Redis就从网上下载了点资料就开始学习了.入门看的是<REDIS入门指南>,这本书个人觉得很适合新手用来学习接触.根据书上的引 ...

  3. 解决Fiddler出现无线弹框 "creation of the root certificate was not successful”的问题

    打开Fiddler 访问:http://localhost:8888/ 安装证书,如果提示没有证书(8888是你在Tool->Fiddler Option->Connections设置的F ...

  4. 用Vue开发一个实时性时间转换功能,看这篇文章就够了

    前言 最近有一个说法,如果你看见某个网站的某个功能,你就大概能猜出背后的业务逻辑是怎么样的,以及你能动手开发一个一毛一样的功能,那么你的前端技能算是进阶中高级水平了.比如咱们今天要聊的这个话题:如何用 ...

  5. JMeter基本元素简介

    JMeter基本元素简介 一.测试计划 测试计划对象有一个复选框叫做"Functional Testing"(函数测试模式),如果选中,它将使jmeter记录服务端返回的每一个样例 ...

  6. 如何上传webshell后改回原来的webshell的格式

    一般后台不给允许上传php,asp格式的东东 所以我们要把木马改为jpg格式 记录下上传的路径 我们上传后木马因为格式不对不能被正确解析,我们可以利用网站的备份数据库模式恢复格式 在备份数据库那填上我 ...

  7. 学习笔记 - 兼容ie的透明度问题

    .opacity{font-size: 14px;-khtml-opacity:0.6;-moz-opacity:0.6;filter:alpha(opacity=60);filter:"a ...

  8. Codefoces 723B Text Document Analysis

    B. Text Document Analysis time limit per test:1 second memory limit per test:256 megabytes input:sta ...

  9. 2017 Multi-University Training Contest - Team 9 1004&&HDU 6164 Dying Light【数学+模拟】

    Dying Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Tot ...

  10. bzoj:1656 [Usaco2006 Jan] The Grove 树木

    Description The pasture contains a small, contiguous grove of trees that has no 'holes' in the middl ...