Skip to content

The new -ProgressAction common parameter breaks calls to advanced scripts and functions. #20657

@mklement0

Description

@mklement0

Prerequisites

Steps to reproduce

-ProgressAction Ignore should translate into a target scope-local $ProgressPreference = 'Ignore' variable, analogously to how it works with other common parameter, such as -ErrorAction.

& { [CmdletBinding()]param() $ProgressPreference } -ProgressAction Ignore

Expected behavior

Ignore

Actual behavior

The following error occurs:

: Specified argument was out of the range of valid values. (Parameter 'index')

Error details

No response

Environment data

PowerShell 7.4.1

Visuals

No response

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 productResolution-DuplicateThe issue is a duplicate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions