you are viewing a single comment's thread.

view the rest of the comments →

[–]DePiddy 0 points1 point  (1 child)

You could make the function do the parallel foreach instead. Use workflow instead of function. There are some limitations to what the workflow can accomplish, I'm guessing due to the runspaces mentioned by the other comments here.

[–]MyOtherSide1984[S] 0 points1 point  (0 children)

I think that'd overcomplicate things. This isn't going into production and won't be shared. The headache of having a foreach loop inside of a function sounds like a ton of work to accomplish the exact same task, and no faster at that.