Skip to content

Doc Bug in AddScript API #15537

@sdwheeler

Description

@sdwheeler

Copied from MicrosoftDocs/PowerShell-Docs#4472

This is a bug in the API documentation for AddScript(). The API documentation comes from /// comments in the source code to this must be fixed in the source code. The example shown in the docs is using AddCommand() instead of AddScript. Also the line break and indentation could be improved for readability.

Both overloads are affected:

/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("foreach { $_.Name }", true);
/// </code>

/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("foreach { $_.Name }", true);
/// </code>

Metadata

Metadata

Assignees

No one assigned

    Labels

    First-Time-IssueEasy issues first time contributors can work on to learn about this projectIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions