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