Skip to content

After installing the preview version of PowerShell 7 (7.4.0-preview.5), it launches by default when I call pwsh. How do I get 7.3.7 to remain as the default PowerShell version side by side with the preview? #20374

@futuremotiondev

Description

@futuremotiondev

Prerequisites

Steps to reproduce

  1. Ensure you have PowerShell 7 (7.3.7) installed on your machine.
  2. Install the preview version of PowerShell 7 (7.4.0-preview.5) via winget install --id Microsoft.Powershell.Preview --source winget
  3. Press WIN-R to open the run dialog, and type pwsh.
  4. Observe that 7.4.0 opens now instead of 7.3.7.

Interestingly enough, if I open a command prompt (windows cmd), and then type pwsh, it opens the correct version (7.3.7)

Expected behavior

Running `pwsh` opens the non-preview version of PowerShell 7.

Actual behavior

Running `pwsh` opens the preview version of PowerShell 7.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.5
PSEdition                      Core
GitCommitId                    7.4.0-preview.5
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the product

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions