Skip to content

Support Windows PowerShell 5.1 #411

@RespectMathias

Description

@RespectMathias

Describe the feature or problem you'd like to solve

GitHub Copilot CLI currently requires PowerShell 6+ (pwsh), but the latest version of Windows 11 ships with Windows PowerShell 5.1 (version 5.1.26100.6899) as the default and only pre-installed PowerShell version. This creates an unnecessary barrier to entry for Windows users. The current error when attempting to use Copilot CLI on a default Windows installation is: PowerShell <exited with error: PowerShell 6+ (pwsh) is not available. Please install it from https://aka.ms/powershell. Error: Error: Command failed: pwsh.exe --version 'pwsh.exe' is not recognized as an internal or external command, operable program or batch file. > This version check is arbitrary the CLI works perfectly fine on PowerShell 5.1 with no issues. I know this as I made a quick proof of concept where I trick the program into thinking it is on such a version https://github.com/RespectMathias/pwsh-copilot.

Proposed solution

The CLI already works correctly on PowerShell 5.1. There are no features that actually require PowerShell 6+.

Example prompts or workflows

Current workflow (unnecessary friction):
npm install -g @github/copilot
Receive error about pwsh not being available
Install PowerShell 7+ manually
Finally use copilot

Proposed workflow (works immediately):
npm install -g @github/copilot
Use copilot immediately

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions