-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Description
Summary of the new feature / enhancement
Passing multiple processes to Wait-Process currently makes the latter wait for all target processes.
However, it is sometimes desirable to only wait for any one of these processes to terminate.
Proposed technical implementation details (optional)
-
Introduce an
-Anyswitch that makesWait-Processreturn as soon as any one of the target processes terminates. -
Complement it with a
-PassThruswitch to pass a process-info object(s) for the terminated process(es) through - this should work whether or not-Anyis used.
kasini3000, iSazonov and mpermino
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module