pizzim13
Contributor
Contributor

Any way to throttle asynchronous tasks?

For example,

foreach ($VM in $VMS)
     {
     Move-VM -VM $VM -Datastore $Datastore -RunAsync
     }

and make so that only X amount of SvMotions are running concurrently. Once one finishes, the next one would start. I assume I would use Get-Task to count how many jobs are running.

Reply
0 Kudos