-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Document -WindowStyle Hidden behavior change on Windows 11 24H2+ #12897
Copy link
Copy link
Open
Labels
hold-for-prWaiting - for PR mergeWaiting - for PR mergehold-for-releaseWaiting - for next releaseWaiting - for next release
Description
Summary
PowerShell/PowerShell#27111 fixes PowerShell/PowerShell#3028 by eliminating the console window flash when launching pwsh -WindowStyle Hidden on Windows 11 24H2+ (build 26100+).
The fix uses consoleAllocationPolicy=detached in the pwsh.exe manifest and AllocConsoleWithOptions to allocate the console programmatically — invisibly when -WindowStyle Hidden is specified.
Pages to update
about_pwsh— The-WindowStyleparameter section should note that on Windows 11 24H2+,-WindowStyle Hiddenprevents console window creation entirely (rather than creating then hiding).
Behavior change
| Windows version | Old behavior | New behavior |
|---|---|---|
| Before build 26100 | Console window flashes briefly, then hides | Unchanged |
| Build 26100+ | Console window flashes briefly, then hides | No console window created |
Related
- Fix PR: Fix -WindowStyle Hidden console window flash PowerShell/PowerShell#27111
- Issue: Powershell -WindowStyle Hidden still shows a window briefly PowerShell/PowerShell#3028 (open since January 2017, 160+ upvotes)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
hold-for-prWaiting - for PR mergeWaiting - for PR mergehold-for-releaseWaiting - for next releaseWaiting - for next release