Using -AsPlainText parameter with PowerShell 5.1 fails #7
Labels
bug
Something isn't working
downlevel compatibility
Issues with Windows PowerShell 5.1.
good first issue
Good for newcomers
Milestone
I tried using your module with PowerShell 5.1 on Windows 10, but whenever I use the parameter -AsPlainText it fails with the following error.
I looked up ConvertFrom-SecureString on Microsoft's site an it appears that -AsPlainText was not an option in PowerShell 5.1 but is in PowerShell 7 +
I wonder if it would be possible to detect the if a version of PowerShell less than 7 is being used and if so omit the -AsPlainText parameter, like this. I did a quick test and it seemed to work with PowerShell 5.1
The text was updated successfully, but these errors were encountered: