# Workflows -- Parallel Throttle Limit?

**URL:** <https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942>\
**Category:** PowerShell Help\
**Created:** [October 9, 2013, 5:54am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942 "2013-10-09T05:54:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iancaseydouglas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/iancaseydouglas/32/506_2.png) [@iancaseydouglas](https://forums.powershell.org/u/iancaseydouglas)\
**Post date:** [October 9, 2013, 5:54am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/1 "2013-10-09T05:54:13Z")

</div>

I just started using the new workflow construct in posh, and I’m wondering if there’s a way to specify a ‘throttle limit’ ( or something similar) parameter in the parallel blocks so that only x-number of simultaneous instructions get executed at once. For example, i would like to limit the following file copies to 32 nodes at a time:

workflow Distribute-Directory  
{  
[CmdletBinding()]Â Â  
Param  
(  
$dir\_source = ‘C:\TEMP\_packages\Intel-825xx-Gigabit-Ethernet-Controller’,  
$dir\_dest = ‘c$\temp’,  
[string]$node  
)

Foreach -parallel ($node\_dest in $node) {

```
cmd /c robocopy $dir_source $("\\"+$node_dest+"\"+$dir_dest+"\"+(get-item $dir_source).Name) /E 

} 

```

}

Many thanks!

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [October 9, 2013, 6:26am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/2 "2013-10-09T06:26:07Z")

</div>

That was added as a feature in v4, I believe.

---

<div class="post-metadata">

**Author:** ![shawnwat](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@shawnwat](https://forums.powershell.org/u/shawnwat)\
**Post date:** [August 9, 2016, 6:36am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/3 "2016-08-09T06:36:51Z")

</div>

Can anyone confirm/deny that the parameter -Throttlelimit works above 5?  
ex.  
ForEach -Parallel -ThrottleLimit 10 ( $database in $databases )

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [August 9, 2016, 7:14am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/4 "2016-08-09T07:14:51Z")

</div>

Shawn - be sure to start a new thread for a new question; I almost missed your reply, here.

The WWF engine handles the throttling; you can specify an upper limit, but the engine doesn’t have to use as many threads as you specify.

---

<div class="post-metadata">

**Author:** ![glaxmanrao](https://avatars.discourse-cdn.com/v4/letter/g/3ab097/32.png) [@glaxmanrao](https://forums.powershell.org/u/glaxmanrao)\
**Post date:** [July 6, 2017, 4:08am UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/5 "2017-07-06T04:08:47Z")

</div>

Any alternate or substitute to overcome the default throttle limit(5) or more than 5 ?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:38pm UTC](https://forums.powershell.org/t/workflows-parallel-throttle-limit/1942/6 "2024-05-16T20:38:25Z")

</div>

Closed on May 16, 2024, 8:38pm UTC


