This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
Support for non-Windows OS & target host in Environment variable #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes I've made are to allow the module to run in PowerShell core 6.1 on non-Windows OSes - the original code wasn't designed to connect to an SSH session.
The remote session is PowerShell core 6.1, and it is possible to load the module in that session, import a Windows PowerShell 5.1 module and then use Import-PSSession from Linux to access a 5.1 module with a "double hop".
I've tested the changes in the Linux subsystem on Window 10 only, and more extensive testing on "real" Linux and Mac would be ideal.
In some environments it would be useful to specify the Server hosting the compatibility session as an environment variable so I've added that.
The existing Pester tests pass on Windows; I haven't added any new tests.