Skip to content

Start-Job emits incorrect error message when specifying PowerShell version 2.0. #16062

Closed

Description

Prerequisites

Steps to reproduce

PS C:\> Start-Job -PSVersion 2.0 -ScriptBlock { $PSVersionTable } | Receive-Job -Wait

Starting 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.

Expected behavior

Start-Job: Cannot bind parameter 'PSVersion' to the target. Exception setting "PSVersion": "PowerShell version 2.0 is not supported."

Actual behavior

Start-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."

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.9
PSEdition                      Core
GitCommitId                    7.2.0-preview.9-32-g17986d88c10eb6271b1aad2ca955889e45e2b285
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Activity

  1. added
    Needs-Triage
    on Sep 7, 2021
  2. added
    WG-Engine
    on Sep 7, 2021
  3. added
    WG-Remoting
    and removed
    WG-Engine
    on Sep 15, 2021
  4. added
    Issue-Bug
    Up-for-Grabs
    and removed
    Needs-Triage
    on Sep 17, 2021
  5. PaulHigin commented on Sep 17, 2021

    @PaulHigin
    ContributorAuthor

    WG-Remoting

  6. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  7. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  8. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  9. added
    Resolution-No Activity
    on Nov 16, 2023
  10. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugResolution-No ActivityUp-for-GrabsWG-Remoting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions