Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 181080

Host count Report

$
0
0

Hi

 

I get the cluster name to export to a csv file but not the count.

 

It probably is something silly that i am overlooking.

 

Code:

 

$Clusters = Get-Cluster

foreach ($Cluster in $Clusters){

    $VMHosts = Get-Cluster $Cluster | Get-VMHost
   
    $TotalBlades = [math]::round(($VMHosts.count.ToString)) |

Select-Object @{N="Cluster";E={$Cluster.Name}},@{N="BladeCount";E={$TotalBlades}} |
Export-csv Blade-Count.csv -NoTypeInformation
   
}

 

Thanks


Viewing all articles
Browse latest Browse all 181080

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>