ForEach-Object -parallel

Use this forum to ask about non-product related topics (login issues, product registrations, web site questions, etc.) No technical support questions, please.
Forum rules
Do not post any licensing information in this forum.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
Posts: 5
Last visit: Fri May 07, 2021 10:58 am

ForEach-Object -parallel

Post by SchuleDigital_HG »


i have a problem with the new PowerShell7 Feature "ForEach-Object -parallel !!!!

I tryed a lot of thinks, but nothing workted for me, I hope you can help.

I try this code:

1 .. 5 | ForEach-Object -Parallel { "Hello $_"; sleep 2; } -ThrottleLimit 5
$textbox1.Text = "Fertig"

In PowerShellStudio 2021 i select V7 - 64 Bit and hit run. Everythink good, no Problem.

So I hit "Package" and "Build". (In settings i choose Powershell 7.1.0 and Windows Forms)
Than I hit the EXE File. The Programm Starts, but I never come to the point of "$textbox1.text".
In the Taskmanager I can see that 5 new Processes are started called "Windows Powershell", but nothink happen.

So my script and the processes run forever.

I hope someone can help me.

User avatar
Site Admin
Posts: 160
Last visit: Thu Jun 10, 2021 9:12 am

Re: ForEach-Object -parallel

Post by Olga_B »

Thanks for reporting the problem, we have been able to reproduce it and have filed a bug report with the development team.
We are investigating this and will update you as soon as we have more information

User avatar
Alexander Riedel
Posts: 7700
Last visit: Fri Jun 18, 2021 10:15 am
Answers: 4
Been upvoted: 10 times

Re: ForEach-Object -parallel

Post by Alexander Riedel »

Please do not double post. This topic will be closed.
Alexander Riedel
SAPIEN Technologies, Inc.