Title: Start-Job emits incorrect error message when specifying PowerShell version 2.0. · Issue #16062 · PowerShell/PowerShell · GitHub
Open Graph Title: Start-Job emits incorrect error message when specifying PowerShell version 2.0. · Issue #16062 · PowerShell/PowerShell
X Title: Start-Job emits incorrect error message when specifying PowerShell version 2.0. · Issue #16062 · PowerShell/PowerShell
Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
Open Graph Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
X Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
Opengraph URL: https://github.com/PowerShell/PowerShell
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Start-Job emits incorrect error message when specifying PowerShell version 2.0.","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n```powershell\r\nPS C:\\> Start-Job -PSVersion 2.0 -ScriptBlock { $PSVersionTable } | Receive-Job -Wait\r\n```\r\nStarting a job with that runs in PowerShell version 2.0 is not supported. The current error message is misleading because it tells the user to first install PowerShell 2.0, even though it is unsupported whether it is installed or not.\n\n### Expected behavior\n\n```console\nStart-Job: Cannot bind parameter 'PSVersion' to the target. Exception setting \"PSVersion\": \"PowerShell version 2.0 is not supported.\"\n```\n\n\n### Actual behavior\n\n```console\nStart-Job: Cannot bind parameter 'PSVersion' to the target. Exception setting \"PSVersion\": \"PowerShell 2.0 is not installed. Install PowerShell 2.0, and then try again.\"\n```\n\n\n### Error details\n\n_No response_\n\n### Environment data\n\n```powershell\nName Value\r\n---- -----\r\nPSVersion 7.2.0-preview.9\r\nPSEdition Core\r\nGitCommitId 7.2.0-preview.9-32-g17986d88c10eb6271b1aad2ca955889e45e2b285\r\nOS Microsoft Windows 10.0.19043\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\n```\n\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/PaulHigin","@type":"Person","name":"PaulHigin"},"datePublished":"2021-09-07T16:54:07Z","url":"https://github.com/PowerShell/PowerShell/issues/16062"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:780a406b-d861-4bd2-adf8-f86cedc7dcab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE22:204060:BC7EC2:10965A6:6AFDD3FE |
| html-safe-nonce | 32de82e05276af28cc5bd0d2f091d093000cb8a4ddc5421561444ed5f58eff66 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTIyOjIwNDA2MDpCQzdFQzI6MTA5NjVBNjo2QUZERDNGRSIsInZpc2l0b3JfaWQiOiIyMDQxOTA2NDgxNzExNjY2MTc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 59aeda7c8b6b5d137a09a615e2cc0cbe24094fd9f8474029cfb84405a1bf5325 |
| hovercard-subject-tag | repository:49609581 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/issues/16062 |
| twitter:image | https://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd |
| og:image:alt | PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26886a40b582b821a7a76351e0a2f42b6d6160854b6e2520db24f31fd7be5da7 |
| turbo-cache-control | no-cache |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 68ebaa631a1d248d69ebde4b9c5defd3a19aeb2f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width