Skip to content

Document -WindowStyle Hidden behavior change on Windows 11 24H2+ #12897

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 -WindowStyle parameter section should note that on Windows 11 24H2+, -WindowStyle Hidden prevents 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions