Visitar URL original
`ShouldProcess` should be allowed to change the default answer · Issue #18679 · PowerShell/PowerShell · GitHub
The Wayback Machine - https://web.archive.org/web/20251211234815/https://github.com/PowerShell/PowerShell/issues/18679
Skip to content

ShouldProcess should be allowed to change the default answer #18679

@giggio

Description

@giggio

Summary of the new feature / enhancement

The default answer for ShouldProcess is always Yes, we should be able to change it to No.

Proposed technical implementation details (optional)

ShouldContinue already implements this with a hasSecurityImpact argument, this could use the same argument to make the api consistent.

Reference: https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.cmdlet.shouldcontinue?view=powershellsdk-1.1.0#system-management-automation-cmdlet-shouldcontinue(system-string-system-string-system-boolean-system-boolean@-system-boolean@)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions