You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to directly use variable values from the caller's scope in a job script block, you must use the $using: scope (as a more convenient alternative to passing arguments).
This fact should be mentioned in these topics, and they should link to about_Remote_Variables for further information.
Note that special considerations apply to Start-ThreadJob with $using: references whose values are instances of reference types, because the same object can potentially be modified my multiple thread jobs in a non-thread-safe way; this is more likely to occur with ForEach-Object -Parallel - where it is already documented, but it's worth mentioning in the Start-ThreadJob topic too.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 8cd0b9ee-c3dc-4235-bbe9-4330c21e4e30
Version Independent ID: d0d0617d-8287-3d93-a1da-02ff348ca5b6