You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Write-Host prints ANSI control characters when running script from stdin even if stdout is redirected #26631
I'm working on this: not emitting those VT sequences when commands come from stdin, while keeping the interactive behaviour from #14943. @PowerShell/powershell could you assign it to me?
Activity
mklement0 commentedon Dec 20, 2025
Please see:
$PSStyle.OutputRendering = 'Host', outputs ANSI/VT escape sequences unconditionally #20170Conceptually related:
pwsh -Command -andpwsh -File -unexpectedly exhibit pseudo-interactive behavior, lack support for argument passing #3223SeeminglyScience commentedon Oct 5, 2026
The Engine WG discussed this, we agree that the host should not be emitting these VT sequences when processing stdin as commands.
For reference:
Here's where they are defined in the code.
Here's the PR where it was added.
candygoogy commentedon Oct 11, 2026
I'm working on this: not emitting those VT sequences when commands come from stdin, while keeping the interactive behaviour from #14943. @PowerShell/powershell could you assign it to me?