I have created a script to start the VM resources on clusters. The script is working fine but it is starting all VM resources cluster by cluster only.
My requirement is starting the 5 VM resources for the first cluster then starting another 5 VM resources in the second cluster, again it has to start 5 VM resources on the first cluster and another 5 VM resources on the second cluster
can anyone help me, please?
Cluster resources power on start here
$clusters = Get-Content "c:\temp\Clusters.txt"
foreach ($clu in $clusters){
write-host "Cluster VM resources bringing online for cluster $clu" -ForegroundColor Green
$c = Get-Cluster -name $clu | Get-ClusterResource | where { $_.Name -and $_.state -eq "offline"} | Start-ClusterResource -ErrorAction SilentlyContinue -Verbose
echo $c
}