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.
ForEach-Object -parallel
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.
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.
Re: ForEach-Object -parallel
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
We are investigating this and will update you as soon as we have more information
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: ForEach-Object -parallel
Please do not double post. This topic will be closed.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.