【问题标题】:List VMs and their cluster列出虚拟机及其集群
【发布时间】:2017-01-11 20:37:32
【问题描述】:

我想连接到多个 VIserver 并列出所有虚拟机及其各自的集群。这可能吗?

我已经到了Get-VM | Select Name,VMHost。什么属性代替 VMHost 会列出集群?

【问题讨论】:

    标签: powershell vsphere powercli


    【解决方案1】:

    根据您的用例,如果您知道集群,您也可以获得虚拟机:

    Get-Cluster | Get-VM
    

    【讨论】:

      【解决方案2】:

      试试看

      Get-VM | Select-Object -Property Name,@{Name=’Cluster’;Expression={$_.VMHost.Parent}}
      

      我找到了here

      【讨论】:

        猜你喜欢
        • 2023-01-27
        • 2023-03-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多