I am trying create a on-liner script which gives an outputs of Hosts and vm's counts in a vcenter cluster like as below.
Cluster: VMHost VM's Cluster01 04 15 cluster02 02 35 Just using a sample onliner
Get-VMHost | Select @{N=“Cl“;E={Get-Cluster -VMHost $_}} Name, @{N=“NumVM“;E={($_ | Get-VM).Count}} | Sort Cluster, Name any Ideas?? Thanks in advance
Regards, Subash.