Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-1623) Change $host.Version to $PSVersionTable.PSVersion #1624

Closed
wants to merge 1 commit into from
Closed

(GH-1623) Change $host.Version to $PSVersionTable.PSVersion #1624

wants to merge 1 commit into from

Conversation

MaxBurgert
Copy link
Contributor

@MaxBurgert MaxBurgert commented Aug 8, 2018

With the latest release of Powershell, this line throws an SetValueInvocationException: "The requested security protocol is not supported."
Change the SecurityProtocol to SystemDefault ensures backwards compatibility and is necessary since Ssl3 is deprecated.

Fixes GH-1623

@MaxBurgert MaxBurgert changed the title (GH-1623) Change SecurityProtocol to SystemDefault (GH-1623) Change $host.Version to $PSVersionTable.PSVersion Aug 9, 2018
@MaxBurgert
Copy link
Contributor Author

You're right, this was not the issue.
The issue was with Visual Studio Code, which returned for $host.Version not the actual PowerShell version, whereby a comparison with $PSVersionTable.PSVersion will result in the expected behaviour.
I've updated the title of the PR.
With cfdadc6, the comparison is done in the appropriate way as The Scripting Guys mentioned here.

@ferventcoder
Copy link
Member

Looks like all of the other places were already fixed up - thanks for catching this. Rebased to stable and merged into stable at d43e9fd

@ferventcoder
Copy link
Member

Thanks for the contribution!

@ferventcoder ferventcoder self-assigned this Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants