Pages: [1]
Print
Author Topic: List Cluster, ESX Host, Host Memory Amount, VM Count Memory Allocated to Cluster  (Read 1040 times)
esarakaitis
Administrator
Sr. Member
*****
Posts: 256


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« on: December 23, 2009, 10:08:55 AM »

Code:
foreach ($cluster in get-cluster)
{
$meminfo = $cluster | get-vm | measure-object -property memorymb -sum
$hostcount = $cluster | get-vmhost |  measure-object
    "" | select-object @{Name="Cluster"; Expression={$cluster.name}},
                       @{Name="Hosts"; Expression={$hostcount.count}},
                       @{Name="Num VM's"; Expression={$meminfo.count}},
                       @{Name="Mem Allocation"; Expression={$meminfo.Sum}}
 }  
 
Logged
Pages: [1]
Print
Jump to: