Fix PSVersion parameter version checks and error messages for PowerShell core remoting#16228
Fix PSVersion parameter version checks and error messages for PowerShell core remoting#16228daxian-dbw merged 5 commits intoPowerShell:masterfrom PaulHigin:remote-psversion
Conversation
| <data name="PowerShellNotInstalled" xml:space="preserve"> | ||
| <value>PowerShell {0} is not installed. Install PowerShell {0}, and then try again.</value> | ||
| <data name="PowerShellVersionNotSupported" xml:space="preserve"> | ||
| <value>PowerShell remoting endpoint versioning is not supported on PowerShell Core.</value> |
There was a problem hiding this comment.
Should we have PowerShell Committee for the decision?
Previously we support side-by-side scenarios, ex. 7.0 and 7.1 versions are installed simultaneously.
There was a problem hiding this comment.
@PowerShell/powershell-committee reviewed this and we have an existing side-by-side story with PS7 which is to use the full path to pwsh to use a specific version of PS7. We don't believe there is a real world scenario where supporting -PSVersion to specify a PS7 version that would be unsupported by 3 years (at most). If there is a real world scenario that we are not aware of, we recommend opening a Discussion to help us understand. This PR doesn't prevent future support of such a feature if it makes sense.
|
@TravisEz13 and @SteveL-MSFT please review when you have time, thanks! |
…tJob.cs Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
| <data name="PowerShellNotInstalled" xml:space="preserve"> | ||
| <value>PowerShell {0} is not installed. Install PowerShell {0}, and then try again.</value> | ||
| <data name="PowerShellVersionNotSupported" xml:space="preserve"> | ||
| <value>PowerShell remoting endpoint versioning is not supported on PowerShell Core.</value> |
There was a problem hiding this comment.
@PowerShell/powershell-committee reviewed this and we have an existing side-by-side story with PS7 which is to use the full path to pwsh to use a specific version of PS7. We don't believe there is a real world scenario where supporting -PSVersion to specify a PS7 version that would be unsupported by 3 years (at most). If there is a real world scenario that we are not aware of, we recommend opening a Discussion to help us understand. This PR doesn't prevent future support of such a feature if it makes sense.
…omShellCommands.cs Co-authored-by: Steve Lee <slee@microsoft.com>
…Shell into remote-psversion
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
🎉 Handy links: |
PR Summary
This PR addresses issue #16062.
PR Context
Windows PowerShell supports remoting endpoint configurations that run on versions 2,3,4,5 of PowerShell. However, the PowerShell core WinRM plugin only supports endpoints that run in the currently installed version of PowerShell core, and ignores the
-PSVersionparameter. This change removes the old supported version checks for the-PSVersionparameter on the configuration cmdlets and now throws anot supportederror.Also,
Start-Jobused to support running jobs in multiple WindowsPowerShell versions via the-PSVersionparameter, but now only supports version5.1in PowerShell core. So this fix updates the version check and error message to provide correct information.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).