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.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
SchuleDigital_HG
Posts: 5
Last visit: Tue Nov 28, 2023 6:48 am

ForEach-Object -parallel

Post by SchuleDigital_HG »

Hallo,

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
Olga_B
Site Admin
Posts: 196
Last visit: Mon Mar 18, 2024 9:24 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: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: ForEach-Object -parallel

Post by Alexander Riedel »

Please do not double post. This topic will be closed.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.