Register-PSSessionConfiguration -Path ".\ContosoJEA.pssc" -PSVersion 7.0
Expected to be able to register a PSSession Configuration with a PSVersion of 7.0.
Register-PSSessionConfiguration: Cannot bind parameter 'PSVersion' to the target. Exception setting "PSVersion": "The value 7.0 is not valid for the PSVersion parameter. The available values are 2.0, 3.0, 4.0, 5.0, 5.1."
Name Value
---- -----
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Note, if you omit the -PSVersion parameter it will successfully register it as a 7.0 session configuration. So really the issue here is consistency and confusion on the parameter.
Good find; also affects Set-PSSessionConfiguration.
Note that since you should be able to create and modify arbitrary session configurations, this should still be fixed.
For reference #11616
@iSazonov, the linked issue is about what endpoint to connect to _by default_, _from a client's perspective_.
By contrast, this issue is about _manually managing_ endpoint definitions (session configurations) on machines acting as remoting _servers_.
If you opt to do so (you may not have to, given that Enable-PSRemoting creates the current version's endpoints for you with defaults), you should be able to specify any existing PowerShell version.
(It seems to me that the value of -PSVersion is only for _informational_ purposes, right? Even if so, you should be able to specify any of the existing version numbers.)
Therefore, please reopen this issue.
Sorry, this was an accident.
Most helpful comment
Good find; also affects
Set-PSSessionConfiguration.Note that since you should be able to create and modify arbitrary session configurations, this should still be fixed.