Skip to content

Enumerate and run installed PowerShell versions #4836

Description

@iSazonov

Currently we changed semantic of -version command line parameter from "run Windows PowerShell 2.0" to "show current PowerShell version".

Now we need a way to address a side-by-side scenario - to enumerate installed PowerShell versions and run needed PowerShell version.

Suggesion

[ ] Enumerate installed versions:

>powershell -versions

[ ] Run needed version:

powershell -versions <ver spec>

Activity

  1. added
    Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7
    Issue-Enhancementthe issue is more of a feature request than a bug
    on Sep 14, 2017
  2. iSazonov commented on Sep 28, 2017

    @iSazonov
    CollaboratorAuthor

    I am ready to implement enumeration of installed versions based on https://github.com/PowerShell/vscode-powershell/blob/c3e987c9e9add273e6699972bb017ccfbc47e873/src/platform.ts#L110

    What directories we use on Linux and Mac?

  3. joeyaiello commented on Oct 4, 2017

    @joeyaiello
    Contributor

    I totally understand the need for this, but I think that it probably shouldn't be implemented in the host binary. Ultimately, this is the job of the package manager, but I get why we might need something like virtualenv as well.

    However, at this point in the release cycle, it's a pretty high-risk change to bring in (and potentially get wrong), especially when you consider that there won't be any production scenarios for side-by-side 6.x's for at least a little while.

    When we do want to bring it in, we should have an RFC for it (and I think we should have some alternate designs that include a PS module that enumerates versions as well as whether it should be a native tool to support bootstrap scenarios).

    Ilya (@iSazonov) do you have a scenario today where this is critical? I think unpacking that is the first step to understanding the proper implementation here (and where having a pwsh alias for PS Core isn't enough).

  4. iSazonov commented on Oct 5, 2017

    @iSazonov
    CollaboratorAuthor

    Joey Aiello (@joeyaiello) I see that VS Code (see link above) discover installed PowerShell versions and allow users run desired version.
    Also I know Microsoft SCOR 2012 product. It is based on PowerShell 2.0 (!!!). If users need new features they are forced to run needed version explicitly.
    I believe it is better to have the discover feature natively (specially on Windows) - this will make other products more stable.
    I'm not sure about launching, but it's also interesting, all the more so when we had -Version 2.

  5. iSazonov commented on Oct 12, 2017

    @iSazonov
    CollaboratorAuthor

    Any news?

  6. added
    Committee-ReviewedPS-Committee has reviewed this and made a decision
    and removed
    Review - CommitteeThe PR/Issue needs a review from the PowerShell Committee
    on Dec 6, 2017
  7. SteveL-MSFT commented on Dec 6, 2017

    @SteveL-MSFT
    Member

    @PowerShell/powershell-committee reviewed this and believes this is should be an RFC for a proposal that can be reviewed in its entirety with considerations for different potential design proposals. However, until we have multiple released versions of PSCore6 and customers depending on side-by-side, we believe that the current side-by-side differentiated by file path is sufficient and may not be worth the effort to draft an RFC as well as submit an implementation PR.

  8. KirkMunro commented on Jun 21, 2019

    @KirkMunro
    Contributor
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

    Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions