Workflow: PWD variable not set during InlineScript execution when the workflow targets remote computers
The PWD automatic variable is not set when the script block passed to InlineScript is executing within a workflow targetting a remote computer. Attempts to retrieve the variable (such as Get-Item Variable:\PWD) fail. The variable becomes present as soon as the first Set-Location statement is executed.
This differs from both powershell.exe and standard PS remoting behavior, where the variable is present from the start.
This issue breaks code which expects the PWD variable to always be available, such as IIS PowerShell Provider cmdlets (e.g. Get-WebApplication).
Client / workflow host: WMF 4.0 on Windows 7, also tested on 8.1
Workflow target: WMF 4.0 on Windows Server 2012 R2, also tested on 2008 R2