Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rhymeswithmogul
Copy link
Owner

Versions 3.0.0 to 3.1.0 (inclusive) of this module contained a bug that prevented it from working correctly on Windows PowerShell 5.1. The call to ConvertFrom-SecureString used the parameter -AsPlainText, which does not exist before PowerShell 7.0.

This commit fixes that by checking to see if ConvertFrom-SecureString supports the -AsPlainText parameter. If so, it is called with it, and if not, it's called without it.

Fixes #7

Versions 3.0.0 to 3.1.0 (inclusive)  of this module contained a bug that
prevented it from working correctly on Windows PowerShell 5.1.  The call
to `ConvertFrom-SecureString` used the parameter `-AsPlainText`, which
does not exist before PowerShell 7.0.

This commit fixes that by checking to see if `ConvertFrom-SecureString`
supports the `-AsPlainText` parameter.  If so, it is called with it, and
if not, it's called without it.

Fixes #7
@rhymeswithmogul rhymeswithmogul added the bug Something isn't working label Nov 3, 2024
@rhymeswithmogul rhymeswithmogul added this to the v3.2.0 milestone Nov 3, 2024
@rhymeswithmogul rhymeswithmogul self-assigned this Nov 3, 2024
@rhymeswithmogul rhymeswithmogul linked an issue Nov 3, 2024 that may be closed by this pull request
@rhymeswithmogul rhymeswithmogul added the downlevel compatibility Issues with Windows PowerShell 5.1. label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working downlevel compatibility Issues with Windows PowerShell 5.1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using -AsPlainText parameter with PowerShell 5.1 fails

2 participants