Skip to content

Invoke-Parallel should use $PSCmdlet instead of $ExecutionContext #5

Closed
@santisq

Description

@santisq

Invoke-Parallel is using it's parent scope context instead of the caller's scope context on $using: statements.

Simple reproduction:

1..1 | Invoke-Parallel { $using:PSBoundParameters }

Outputs:

Key         Value
---         -----
ScriptBlock  $using:PSBoundParameters
InputObject 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions