Currently, Start-Job:
Either way, there is no simple way to have the caller set the working directory explicitly, leading to such painful workarounds as in this SO answer.
The proposed solution:
# Wishful thinking
> $jb = Start-Job -WorkingDirectory $PSHOME { "Hi from $PWD." }; Receive-Job -AutoRemove -Wait $jb
Hi from C:\Program Files\PowerShell\6.0.0-beta.4
Environment data
PowerShell Core v6.0.0-beta.4 on macOS 10.12.5
PowerShell Core v6.0.0-beta.4 on Ubuntu 16.04.2 LTS
PowerShell Core v6.0.0-beta.4 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)
Windows PowerShell v5.1.15063.413 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)
Reactions are currently unavailable
Currently, Start-Job:
defaults to different, fixed working directories on different platforms (which is problematic in itself):
by contrast, using the newly-introduced Unix-like ... & syntax defaults to the current location; this discrepancy is problematic too [update: but as designed] - see Using postpositional & (control operator) rather than Start-Job results in different current location (working directory) #4267
Either way, there is no simple way to have the caller set the working directory explicitly, leading to such painful workarounds as in this SO answer.
The proposed solution:
Environment data