A Using variable cannot be retrieved.
A Using variable can be used only with Invoke-Command, Start-Job, or InlineScript
in the script workflow.
When it is used with Invoke-Command, the Using variable is valid only if the script block is invoked on a remote computer.
To next best thing to having a
-WorkingDirectory
parameter (hopefully soon, see #44) is to try something like the following:However, this currently fails:
This appears to be the same bug as in PowerShell itself (not sure how code is shared): https://github.com/PowerShell/PowerShell/issues/4530
As an aside re the error message:
Start-ThreadJob
now ships with PowerShell, the error message should probably mention it as well.