Get VM list on Hyper-V Cluster

Get VM list on Hyper-V Cluster

June 10, 2020

A command to get the VM list detail that includes VM Name, CPU Count, IP Addresses, VLAN ID, and Memory assigned. The command includes the command below:

  • Get-VM: This command gets the virtual machines from one or more Hyper-V hosts
  • Get-ClusterNode: This command to gets information about one or more nodes, or servers, in a failover cluster
  • Get-VMProcessor: This command to get the CPU count on the Virtual Machine
  • Get-VMNetworkAdapterVlan: This command gets the virtual LAN settings configured on a virtual network adapter.
  • Get-VMNetworkAdapter: This command to gets the Virtual Network Adapter on the VM
Get-VM –ComputerName (Get-ClusterNode) | Select Name,@{label='CPUCount';Expression={($_ | Get-VMProcessor).Count}},@{label='VLAN ID';Expression={($_ | Get-VMNetworkAdapterVlan).AccessVlanId}},@{label='Memory';Expression={($_.MemoryAssigned/1gb)}},@{label='IP Addresses';Expression={($_ | Get-VMNetworkAdapter).IPAddresses}}

Source:
https://www.msnoob.com/one-liner-command-to-get-vm-list-detail-on-hyper-v-cluster.html

Comments ( 1 )

  • Aar / August 28, 2020

    Hello chisqi, long time no see

    Do you still remember me bro? (Aar/grace)

    Now im stayed at surabaya, i hope we can get connected again hehehehe

    Still work around in windows server, virtualization i guess 😬😬😬

Leave a Comments

Your email address will not be published. Required fields are marked *

Copyright ©2023 All rights reserved