找PowerShell中的Azure虚拟机详细信息 [英] Get Azure VM Detail by PowerShell

查看:357
本文介绍了找PowerShell中的Azure虚拟机详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行 GET-AzureVM PowerShell命令,它运行良好,但不会返回任何输出。

另外,在以下的味道,但还是空白造成的任何想法试过吗?

  GET-AzureVM -NameVMNAME|选择对象名称,instancesize,位置


解决方案

您应该叫选择-AzureSubscription订阅名称第一。

有可能被默认为不具有任何虚拟机在其订阅。

要查看当前订阅的名字叫:

  GET-AzureSubscription |选择SubscriptionName

I am trying to run Get-AzureVM PowerShell command, it is running fine but not return any output.

Also tried in following flavor but still blank result any idea?

Get-AzureVM -Name "vmname" |Select-Object name,instancesize,location

解决方案

You should call Select-AzureSubscription "subscription name" first.

It likely is defaulting to a subscription that doesn't have any virtual machines in it.

To view your current subscription names call:

Get-AzureSubscription | select SubscriptionName

这篇关于找PowerShell中的Azure虚拟机详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆