Skip to content

Error when starting powershell 7.4, 7.5 or 7.6; "Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter “startIndex”)" #26536

@segore

Description

@segore

Prerequisites

Steps to reproduce

I am experiencing an issue with Powershell 7.4, 7.5, and 7.6. Whenever I start the shell, the following error occurs:

PowerShell 7.4.13
The shell cannot be started. A failure occurred during initialisation:
Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter “startIndex”)

This problem does not occur in version 7.3. However, Windows 11 now always pushes 7.4 on me, which I unfortunately cannot use.

I have already tried using -NoProfile and deleted the profile, but nothing has helped.

Unfortunately, I have not been able to find anything helpful regarding this issue. Does anyone have any ideas?

Many thanks in advance.

Expected behavior

The shell starts as expected without an error.

Actual behavior

The shell cannot be started. A failure occurred during initialisation:
Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter “startIndex”)

Error details

Environment data

Cannot deliver that information becuase the shell doesnt start.

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions