New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No WhatIf output in Foreach-Object -Parallel #14984
Comments
Remoting working group: We still need to figure out why this is not coming through and possibly add a feature. Do you have a real-life scenario that you need to run whatif in parallel? |
Well, I am using parallel to loop over actions in Azure, that can be time-consuming. |
❯ Copy-Item ./test.ps1 ./test2.ps1 -WhatIf *> test.txt
What if: Performing the operation "Copy File" on target "Item: /Users/******/git/powershell/test.ps1 Destination: /Users/********/git/powershell/test2.ps1". I did a little investigation. It appears that I'll let @PaulHigin speak for what this means for |
@TravisEz13 this would be solved by: #9870 |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
2 similar comments
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
When I run a command with
-WhatIf
switch within aForeach-Object
loop, it shows the "What if: ..." output.When doing the same with
-Parallel
, this output is not shown.If there is
Write-Host
statement in loop body, it is visible in both cases.Is there anything I can do about it? Is it a bug, or by design?
Steps to reproduce
Prepare some directories:
Then remove them with -WhatIf switch using -Parallel
Expected behavior
Should be the same as running:
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: