I have a script to power on HyperV cluster during maintenance activity.The cluster has 200+ VM's in it. When I execute this command it poweron all VM at time.
Get-Cluster -name <clustername> | Get-ClusterResource | where { $_.Name -and $_.state -eq "offline"} | Start-ClusterResource
So is there anyway,so that we can create a condition here to start 20 VM's first then wait for 20 to 30 seconds the proceed with another 20. Again do the same procedure for all 200+ VM's in same manner ?
Can anyone help me here ?