通过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 类库调用自身所带的配置文件中的配置信息,而不是读取应用程序所带的配置信息.代码如下: ...
随机推荐
- Pandas库的使用--Series
一.概念 Series相当于一维数组. 1.调用Series的原生方法创建 import pandas as pd s1 = pd.Series(data=[1,2,4,6,7],index=['a' ...
- [原创]同一个Tomcat,配置多个context、多个Host
需求前提: 系统结束后,需要部署到服务器上. 目前只可以映射到一个固定IP的非80端口. 而server端和web端都要暴露到外网. 所以配置两个context,使得client应用不需要添加服务名, ...
- HTML知识点之表示强调的主要元素
<h1>~<h6> 在HTML中,标题(Heading)元素共有6个级别的标签:<h1>~<h6>.它们都是块级元素.标题数字越小,字体就会越大,标题的 ...
- 用Vue开发一个实时性时间转换功能,看这篇文章就够了
前言 最近有一个说法,如果你看见某个网站的某个功能,你就大概能猜出背后的业务逻辑是怎么样的,以及你能动手开发一个一毛一样的功能,那么你的前端技能算是进阶中高级水平了.比如咱们今天要聊的这个话题:如何用 ...
- 积累jquery一些有意思的函数
$("#btn").unbind("click"); // 让btn这个元素的点击事件失效 $("#btn").unbind(); // 让 ...
- springboot之集成mybatis mongo shiro druid redis jsp
闲来无事,研究一下spingboot 发现好多地方都不一样了,第一个就是官方默认不支持jsp 于是开始狂找资料 终于让我找到了 首先引入依赖如下: <!-- tomcat的支持.--> ...
- Java入门篇(二)——Java语言基础(上)
本篇我们开始进入Java的学习,首先在学习如何编写Java语言前要先了解Java程序的基本结构. 一.Java程序的基本结构 一个Java程序的基本结构大体可以分为包.类.main()主方法.标识符. ...
- JavaScript中常用的正则表达式日常整理(全)
//校验是否全由数字组成 ? 1 2 3 4 5 6 function isDigit(s) { var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) retu ...
- BZOJ 1411&&Vijos 1544 : [ZJOI2009]硬币游戏【递推,快速幂】
1411: [ZJOI2009]硬币游戏 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 897 Solved: 394[Submit][Status ...
- [学习OpenCV攻略][001][Ubuntu安装及配置]
root登入配置 1.sudo passwd root 2.su - root 3.vim /etc/lightdm/lightdm.conf [SeatDefaults] user-session= ...