terminal icon indicating copy to clipboard operation
terminal copied to clipboard

PowerShell argument `WindowStyle -Hidden` is not respected when the default terminal application is Windows Terminal

Open sachinjoseph opened this issue 3 years ago • 21 comments

Windows Terminal version

1.12.10393.0

Windows build number

Microsoft Windows NT 10.0.22549.0

Other Software

Software Version
PowerShell.exe Multiple Versions
pwsh.exe Multiple Versions

Steps to reproduce

  1. Set Windows Terminal as the default terminal application: . image

  2. Make sure to save changes to Windows Terminal Settings, and then using Windows Run, run pwsh -WindowStyle Hidden -Command Sleep 10: image

Expected Behavior

A new PowerShell process launches (Windows Terminal), and it isn't visible. The window may flash for a second. PowerShell window shouldn't be displayed when it's launched with WindowStyle -Hidden.

Actual Behavior

A new PowerShell process launches (on Windows Terminal), and it is visible and remains visible (and waits) for 10 seconds.

image

Note: There is no repro for this issue with Windows Console Host as the default terminal application.

sachinjoseph avatar Feb 11 '22 00:02 sachinjoseph