Hi all,
I am trying to get a pretty much automated script to work to upgrade / remediate dozens of ESXi clusters.
We would like to use the Parallel remediation option, to do some parallel remediation :
$cluster | Remediate-Inventory -Baseline $baselines -ClusterEnableParallelRemediation:$true
From within the GUI we can limt the number of concurrently remediated hosts to a fix number of hosts.
I would like to use this option to limit it to half of the number hosts in a cluster.
But I cannot find the option to use within PowerCLI....
Any one know wheteher this option is available and/or usable from within PowerCLI ?
Thanks and kind regards,
Harold
@hharold
Afaik there is no such option with the cmdlet.
But you could remidiate your servers in batches.
Suppose you have an array with all your server objects, then you could do a loop
$nrParallel = 4
$array = $cluster | Get-VMHost
$endLoop = [math]::Floor($array.Count/$nrParallel) if($array.Count%$nrParallel -eq 0){ $endLoop -= 1
} foreach($i in (0..$endLoop)){ Remediate-Inventory -Entity $array[($i * $nrParallel)..((($i + 1) * $nrParallel) - 1)] -Baseline $baselines -ClusterEnableParallelRemediation:$true }
Try it out first with the -WhatIf parameter
Update: small correction to the logic
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Afaik there is no such option with the cmdlet.
But you could remidiate your servers in batches.
Suppose you have an array with all your server objects, then you could do a loop
$nrParallel = 4
$array = $cluster | Get-VMHost
$endLoop = [math]::Floor($array.Count/$nrParallel) if($array.Count%$nrParallel -eq 0){ $endLoop -= 1
} foreach($i in (0..$endLoop)){ Remediate-Inventory -Entity $array[($i * $nrParallel)..((($i + 1) * $nrParallel) - 1)] -Baseline $baselines -ClusterEnableParallelRemediation:$true }
Try it out first with the -WhatIf parameter
Update: small correction to the logic
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc,
this works !
Super method, didnt came to my mind.
Thanks again.
Kind regards,
Harold
@hharold
Sorry for bumping such an old thread.
Is the syntax for let Update Manager to decide how many do to in parallel?
i.e. Enable Parallel Remediation for hosts selected in clusters
- option Automatically determine the max number of concurrent remediated hosts in a cluster