Skip to content

New -CommandWithArgs param for pwsh #9529

@SteveL-MSFT

Description

@SteveL-MSFT

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Users may want to use pwsh to execute a pipeline or command but wants to be able to pass arguments to it. Currently they have to wrap it as a .ps1 and use -File which allows passing arguments whereas -Command does not. The PSCommandWithArgs Experimental Feature adds a mutually exclusive -CommandWithArgs that treats the first string as the command and subsequent strings as args.

Details

See the associated issue

Articles

  • reference\docs-conceptual\learn\experimental-features.md
  • reference\7.4\Microsoft.PowerShell.Core\About\about_Pwsh.md

Related Source Pull Requests

Related Source Issues

Metadata

Metadata

Assignees

Labels

area-aboutArea - About_ topicsissue-doc-ideaIssue - request for new content

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions