The Windows Compatibility module needs to be able to maintain correspondence between the current working directory in the host session and the current working directory in the compatibility session. Each time the host session directory changes the compatability session needs to the notified of the change. To that end I'm adding a new event LocationChangedAction that will get fired when the host session changes location. From PowerShell, it would be used as follows:
$ExecutionContext.InvokeCommand.LocationChangedAction = {
$newLocation = $_.NewPath.Path
Invoke-Command $CompatibilitySession { Set-Location $using:newLocation }
}
The Windows Compatibility module needs to be able to maintain correspondence between the current working directory in the host session and the current working directory in the compatibility session. Each time the host session directory changes the compatability session needs to the notified of the change. To that end I'm adding a new event
LocationChangedActionthat will get fired when the host session changes location. From PowerShell, it would be used as follows: