Start-Job (now) has a -WorkingDirectory parameter that allows you to control what the script block executed in the background process sees as $PWD, the current location.
For symmetry and convenience, Start-ThreadJob should support -WorkingDirectory too.
(As an aside: For Start-Job, -WorkingDirectory $PWD can be used to make the job use the same location as the caller, for instance; that said, use of the caller's location should have been the default all along, and in the case of Start-ThreadJob it's not too late to fix that - see #46)
Start-Job
(now) has a-WorkingDirectory
parameter that allows you to control what the script block executed in the background process sees as$PWD
, the current location.For symmetry and convenience,
Start-ThreadJob
should support-WorkingDirectory
too.(As an aside: For
Start-Job
,-WorkingDirectory $PWD
can be used to make the job use the same location as the caller, for instance; that said, use of the caller's location should have been the default all along, and in the case ofStart-ThreadJob
it's not too late to fix that - see #46)