microsoft / microsoft/terminal
PowerShell argument `WindowStyle -Hidden` is not respected when the default terminal application is Windows Terminal
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### 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:
.

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

### 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.

Note: There is no repro for this issue with `Windows Console Host` as the default terminal application.
Contributor guide
Research direction
Reproduce the behavior with Windows Terminal set as the default terminal and run `pwsh -WindowStyle Hidden -Command Sleep 10`, comparing it with Windows Console Host. Trace the Windows Terminal handling of PowerShell process launch and window visibility; done means the hidden launch remains invisible while the existing console-host behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100