Skip to content

Ensure PowerShell output uses dynamic host sizing and ANSI rendering #7445

@MariusStorhaug

Description

@MariusStorhaug

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently, PowerShell output may be rendered in a legacy squashed format, making it difficult to read and limiting the host's dynamic sizing. This impairs readability and developer experience.

Expected Behavior

PowerShell output should use $PSStyle.OutputRendering = 'Ansi' for improved formatting and dynamic host sizing. All outputs written to the host should be piped through Out-String, allowing better readability and adaptive layout regardless of terminal width.

Anything else?

To address visibility and readability, set $PSStyle.OutputRendering = 'Ansi' before running scripts. Additionally, ensure all outputs sent to the host are piped through Out-String, so they honor dynamic sizing. This will provide clear, non-squashed output, especially in modern terminals.

Invoke-ScriptAnalyzer ... | Out-String

Metadata

Metadata

Assignees

No one assigned

    Labels

    O: backlog 🤖Backlog, stale ignores this labelenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions