Powershell workflow nested inline script in parallel

sakuraime 2,351 Reputation points
2021-06-01T04:30:00.637+00:00

Suppose I have a script in a workflow

foreach -parrallel ($item in $items)

{
    inlinescript
    {
        foreach -parrallel ($item2 in $item2s)
        {

            inlinesscript 
            {

            }

        }
     }
}

is it possible to perform the above nested inline parallel script ? are there any number of max parallel job limitation . ?

Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-06-01T10:32:28.367+00:00

    Hi,

    ForEach -Parallel is valid only in a Windows PowerShell Workflow. I tested the script and the nested "foreach -parallel" didn't work.

    https://learn.microsoft.com/en-us/powershell/module/psworkflow/about/about_foreach-parallel

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.