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

Open
opened 2026-01-31 05:21:20 +00:00 by claunia · 32 comments
Owner

Originally created by @sachinjoseph on GitHub (Feb 11, 2022).

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.

Originally created by @sachinjoseph on GitHub (Feb 11, 2022). ### 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](https://user-images.githubusercontent.com/6994498/153515763-9362bbc3-2c4f-4a8e-8927-804ec3b7c7af.png) 2. Make sure to save changes to Windows Terminal Settings, and then using Windows Run, run `pwsh -WindowStyle Hidden -Command Sleep 10`: ![image](https://user-images.githubusercontent.com/6994498/153516667-363724b3-1400-47ae-aa39-333a74b287d0.png) ### 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](https://user-images.githubusercontent.com/6994498/153516951-e0feb19c-7bf3-4660-a1ba-9195a8034540.png) Note: There is no repro for this issue with `Windows Console Host` as the default terminal application.
claunia added the Issue-FeatureProduct-TerminalArea-DefApp labels 2026-01-31 05:21:21 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 11, 2022):

https://github.com/PowerShell/PowerShell/issues/3028 looks like it's related. This probably requires quite a bit of thinking...

@zadjii-msft commented on GitHub (Feb 11, 2022): https://github.com/PowerShell/PowerShell/issues/3028 looks like it's related. This probably requires quite a bit of thinking...
Author
Owner

@malxau commented on GitHub (Feb 11, 2022):

Dustin wrote a spec for this a while back that doesn't seem to have ever been merged:

https://github.com/microsoft/terminal/pull/7337
ec27049553/doc/specs/%237335%20-%20Console%20Allocation%20Policy.md

Looking at it now the odd part is asking console processes to call ShowWindow. That doesn't seem to fit well with what Terminal is trying to do w.r.t. multi-tab, multi-pane, etc.

@malxau commented on GitHub (Feb 11, 2022): Dustin wrote a spec for this a while back that doesn't seem to have ever been merged: https://github.com/microsoft/terminal/pull/7337 https://github.com/microsoft/terminal/blob/ec27049553e9ca2135068edf8a9946a9d94ae2c4/doc/specs/%237335%20-%20Console%20Allocation%20Policy.md Looking at it now the odd part is asking console processes to call ShowWindow. That doesn't seem to fit well with what Terminal is trying to do w.r.t. multi-tab, multi-pane, etc.
Author
Owner

@sachinjoseph commented on GitHub (Feb 12, 2022):

PowerShell/PowerShell#3028 looks like it's related. This probably requires quite a bit of thinking...

The console window being shown for a second may still be tolerable but with WT the window isn't hidden at all - there's no difference between using the PowerShell argument -WindowStyle Hidden and not using this argument when WT is the default terminal application.

@sachinjoseph commented on GitHub (Feb 12, 2022): > [PowerShell/PowerShell#3028](https://github.com/PowerShell/PowerShell/issues/3028) looks like it's related. This probably requires quite a bit of thinking... The console window being shown for a second may still be tolerable but with WT the window isn't hidden at all - there's no difference between using the PowerShell argument `-WindowStyle Hidden` and not using this argument when WT is the default terminal application.
Author
Owner

@sachinjoseph commented on GitHub (Feb 13, 2022):

This is a blocker for many applications such as rush that use PowerShell to run background tasks. Rush issue tracked here.

@sachinjoseph commented on GitHub (Feb 13, 2022): This is a blocker for many applications such as [rush](https://github.com/microsoft/rush) that use PowerShell to run background tasks. Rush issue tracked [here](https://github.com/microsoft/rushstack/issues/3232).
Author
Owner

@fantesykikachu commented on GitHub (Jul 2, 2022):

just to note, Terminal also doesn't allow the old vbs script trick.
CreateObject("WScript.Shell").Run <batch script>, 0
with conhost this would run the batch script but no window is shown both on screen and on the taskbar.
however with Terminal as the process that runs batch scripts, the script runs but the terminal window is shown.

@fantesykikachu commented on GitHub (Jul 2, 2022): just to note, Terminal also doesn't allow the old vbs script trick. `CreateObject("WScript.Shell").Run <batch script>, 0` with conhost this would run the batch script but no window is shown both on screen and on the taskbar. however with Terminal as the process that runs batch scripts, the script runs but the terminal window is shown.
Author
Owner

@DHowett commented on GitHub (Jul 5, 2022):

It looks like the windowing work done in 1.14 fixed the PowerShell case, but we still have #12154 to consider.

@DHowett commented on GitHub (Jul 5, 2022): It looks like the windowing work done in 1.14 fixed the PowerShell case, but we still have #12154 to consider.
Author
Owner

@HenryBaby commented on GitHub (Nov 25, 2022):

Did this break again somewhere along the way?
Tested on version 1.15.2713.0.

@HenryBaby commented on GitHub (Nov 25, 2022): Did this break again somewhere along the way? Tested on version 1.15.2713.0.
Author
Owner

@KG-droid commented on GitHub (Nov 28, 2022):

Did this break again somewhere along the way? Tested on version 1.15.2713.0

Yeah I've just updated to 1.15.2875.0 and still getting this issue

@KG-droid commented on GitHub (Nov 28, 2022): > Did this break again somewhere along the way? Tested on version 1.15.2713.0 Yeah I've just updated to 1.15.2875.0 and still getting this issue
Author
Owner

@fuba82 commented on GitHub (Mar 29, 2023):

Error still exists 1 year after report... really? 👍

@fuba82 commented on GitHub (Mar 29, 2023): Error still exists 1 year after report... really? 👍
Author
Owner

@KG-droid commented on GitHub (Mar 30, 2023):

Based on other bugs I've logged even with Premier support, it seems Microsoft barely have enough devs to make new features, as they seem to have no time to fix non critical bugs!

@KG-droid commented on GitHub (Mar 30, 2023): Based on other bugs I've logged even with Premier support, it seems Microsoft barely have enough devs to make new features, as they seem to have no time to fix non critical bugs!
Author
Owner

@HenryBaby commented on GitHub (Mar 30, 2023):

@youk not sure why that was directed towards @KG-droid, as it's @fuba82 being childish.

Nonetheless, let's not make this a pie-throwing contest :-)

@HenryBaby commented on GitHub (Mar 30, 2023): @youk not sure why that was directed towards @KG-droid, as it's @fuba82 being childish. Nonetheless, let's not make this a pie-throwing contest :-)
Author
Owner

@fuba82 commented on GitHub (Mar 30, 2023):

Based on other bugs I've logged even with Premier support, it seems Microsoft barely have enough devs to make new features, as they seem to have no time to fix non critical bugs!

Yeah...
Maybe it's time to prioritize Fixing existing Bugs instead of creating new ones. 🤣

@KG-droid Check the changelogs and spare us your childish frustration.
can you be more "specific"?
Link to a Page where X Tags are listed is not helpful!
Also your derogatory comment is not at all...

The changelog Windows Terminal Preview v1.17.1023 does not contain any Fix for THIS problem and the last non-Preview also does not of course, so...
What is your point?

@youk not sure why that was directed towards @KG-droid, as it's @fuba82 being childish.

Nonetheless, let's not make this a pie-throwing contest :-)

Most useful comment I've seems, thanks...👍

@fuba82 commented on GitHub (Mar 30, 2023): > Based on other bugs I've logged even with Premier support, it seems Microsoft barely have enough devs to make new features, as they seem to have no time to fix non critical bugs! Yeah... Maybe it's time to prioritize Fixing existing Bugs instead of creating new ones. 🤣 > @KG-droid Check the [changelogs](https://github.com/microsoft/terminal/tags) and spare us your childish frustration. can you be more "specific"? Link to a Page where X Tags are listed is not helpful! Also your derogatory comment is not at all... The changelog [Windows Terminal Preview v1.17.1023](https://github.com/microsoft/terminal/releases/tag/v1.17.1023) does not contain any Fix for THIS problem and the last non-Preview also does not of course, so... What is your point? > @youk not sure why that was directed towards @KG-droid, as it's @fuba82 being childish. > > Nonetheless, let's not make this a pie-throwing contest :-) Most useful comment I've seems, thanks...👍
Author
Owner

@zadjii-msft commented on GitHub (Mar 30, 2023):

I'm gonna lock this thread for a bit to give everyone some time to relax. Obviously, this is still busted (at least, for Powershell 7 pwsh, though, it seems to work for powershell.exe). You'll note, there's plenty of issues on this repo that are even older than this one. We do our best to fix as many issues as we can, but if this is one that you're particularly passionate about, we'd love to hear suggestions on how to fix it. The Terminal (and PowerShell) are open-source after all ☺️

@zadjii-msft commented on GitHub (Mar 30, 2023): I'm gonna lock this thread for a bit to give everyone some time to relax. Obviously, this is still busted (at least, for Powershell 7 `pwsh`, though, it seems to work for `powershell.exe`). You'll note, there's plenty of issues on this repo that are even older than this one. We do our best to fix as many issues as we can, but if this is one that you're particularly passionate about, we'd love to hear suggestions on how to fix it. The Terminal (and PowerShell) are open-source after all ☺️
Author
Owner

@fubaWoW commented on GitHub (Apr 6, 2023):

it seems to work for powershell.exe

NO it does not...
The Terminal Window just "minimize" but is not "Hidden" as intended!

with the "default" console both of this work:
powershell -WindowStyle Hidden -Command Sleep 10
AND
pwsh -WindowStyle Hidden -Command Sleep 10

@fubaWoW commented on GitHub (Apr 6, 2023): > it seems to work for ``powershell.exe`` NO it does not... The Terminal Window just "minimize" but is not "Hidden" as intended! with the "default" console both of this work: ``powershell -WindowStyle Hidden -Command Sleep 10`` AND ``pwsh -WindowStyle Hidden -Command Sleep 10``
Author
Owner

@KG-droid commented on GitHub (Apr 6, 2023):

Yeh confirmed it just minimises it. I have found what seems to be a work around though:

$script:showwindowAsync = Add-Type -memberDefinition @"
[DllImport ("user32.dll")]
public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdshow);
"@ -name "Win32ShowWindowAsync" -namespace Win32Functions -passThru

$showwindowAsync: : ShowWindowAsync( (Get-Process -id $pid).MainWindowHandle, 2)

If you add that to the start of your scripts it hides the window via win32api. At least then you don't have to just disable Windows Terminal in your organisation to get around this. Although that said it depends how many scripts you have that run as the user, if it's pheasable to add that script to all of them.

@KG-droid commented on GitHub (Apr 6, 2023): Yeh confirmed it just minimises it. I have found what seems to be a work around though: $script:showwindowAsync = Add-Type -memberDefinition @" [DllImport ("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdshow); "@ -name "Win32ShowWindowAsync" -namespace Win32Functions -passThru $showwindowAsync: : ShowWindowAsync( (Get-Process -id $pid).MainWindowHandle, 2) If you add that to the start of your scripts it hides the window via win32api. At least then you don't have to just disable Windows Terminal in your organisation to get around this. Although that said it depends how many scripts you have that run as the user, if it's pheasable to add that script to all of them.
Author
Owner

@fubaWoW commented on GitHub (Apr 13, 2023):

Yeh confirmed it just minimises it. I have found what seems to be a work around though:

$script:showwindowAsync = Add-Type -memberDefinition @" [DllImport ("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdshow); "@ -name "Win32ShowWindowAsync" -namespace Win32Functions -passThru

$showwindowAsync: : ShowWindowAsync( (Get-Process -id $pid).MainWindowHandle, 2)

If you add that to the start of your scripts it hides the window via win32api. At least then you don't have to just disable Windows Terminal in your organisation to get around this. Although that said it depends how many scripts you have that run as the user, if it's pheasable to add that script to all of them.

Yeah, many thanks for that, i already use a C# app for hide console if needed, but...
As of this is a Bug-Report (Issue Tracker) for "Windows Terminal" and the BUG still exists, it is not my point "how to workaround", but thanks anyway!

It's still bugged in "Windows Terminal" and so it is up to them to fix this in the Terminal Code!
Especially as of this is a "Feature" used and working PROPERLY in the default Terminal but it is NOT in "Windows Terminal" and exactly THAT is the point of this Bug-Report!

You can Block me or set anything to Off-topic as often as you want...
But this will NOT fix the (1+ Year old) Bug, it still exists and is not working with powershell.exe nor is it on pwsh.exe, that is REALITY not not a problem with Powershell at all!

@fubaWoW commented on GitHub (Apr 13, 2023): > Yeh confirmed it just minimises it. I have found what seems to be a work around though: > > $script:showwindowAsync = Add-Type -memberDefinition @" [DllImport ("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdshow); "@ -name "Win32ShowWindowAsync" -namespace Win32Functions -passThru > > $showwindowAsync: : ShowWindowAsync( (Get-Process -id $pid).MainWindowHandle, 2) > > If you add that to the start of your scripts it hides the window via win32api. At least then you don't have to just disable Windows Terminal in your organisation to get around this. Although that said it depends how many scripts you have that run as the user, if it's pheasable to add that script to all of them. Yeah, many thanks for that, i already use a C# app for hide console if needed, but... As of this is a Bug-Report (Issue Tracker) for "Windows Terminal" and the BUG still exists, it is not my point "how to workaround", but thanks anyway! It's still bugged in "Windows Terminal" and so it is **up to them** to fix this in the Terminal Code! Especially as of this is a "Feature" used and working PROPERLY in the default Terminal but it is NOT in "Windows Terminal" and exactly THAT is the point of this Bug-Report! You can Block me or set ***anything*** to **Off-topic** as often as you want... But this will **NOT** fix the (1+ Year old) Bug, it still exists and is not working with ``powershell.exe`` nor is it on ``pwsh.exe``, that is REALITY not not a problem with Powershell at all!
Author
Owner

@DHowett commented on GitHub (Apr 28, 2023):

Hey @zadjii-msft! Now that we merged tearoff plus #14944 and #13478, we might have the right underpinnings to let console applications "hide" their windows.

Mini-proposal (which should be fleshed out into a spec):

A console application that hides its window should be detached from the pane/tab it's in and moved to a new tab in a hidden window. That window can show up in the tray icon list of windows, and users can show them if they want, but we won't have to present UI for it. If that console app was already the only tenant in a window (no panes/tabs), we could just mark that one hidden.

@DHowett commented on GitHub (Apr 28, 2023): Hey @zadjii-msft! Now that we merged tearoff plus #14944 and #13478, we might have the right underpinnings to let console applications "hide" their windows. Mini-proposal (which should be fleshed out into a spec): A console application that hides its window should be detached from the pane/tab it's in and moved to a new tab in a hidden window. That window can show up in the tray icon list of windows, and users can show them if they want, but we won't have to present UI for it. If that console app was already the only tenant in a window (no panes/tabs), we could just mark that one hidden.
Author
Owner

@zadjii-msft commented on GitHub (Apr 28, 2023):

That's the first real proposal to SW_HIDE that makes sense to me for a tabbed application.

Though, here's a possible problem:

  • user runs foo.ps1 BUT NOT FROM DEFTERM so closeOnExit is set to graceful
  • foo.ps1 hides the window
  • does it's buisiness
  • exits with error
  • oh noes, the terminal is now hidden and just chillin and the user can't restore it to close it

so we'd need to special case that too

@zadjii-msft commented on GitHub (Apr 28, 2023): That's the first real proposal to SW_HIDE that makes sense to me for a tabbed application. Though, here's a possible problem: * user runs foo.ps1 BUT NOT FROM DEFTERM so closeOnExit is set to graceful * foo.ps1 hides the window * does it's buisiness * exits with error * oh noes, the terminal is now hidden and _just chillin_ and the user can't restore it to close it so we'd need to special case that too
Author
Owner

@KG-droid commented on GitHub (Apr 29, 2023):

Hey @zadjii-msft! Now that we merged tearoff plus #14944 and #13478, we might have the right underpinnings to let console applications "hide" their windows.

Mini-proposal (which should be fleshed out into a spec):

A console application that hides its window should be detached from the pane/tab it's in and moved to a new tab in a hidden window. That window can show up in the tray icon list of windows, and users can show them if they want, but we won't have to present UI for it. If that console app was already the only tenant in a window (no panes/tabs), we could just mark that one hidden.

Hi DHowett
When you say "That window can show up in the tray icon list of windows", do you mean a user would be able to just click the icon in the tray/taskbar icons and re-open the hidden window? As ideally from a business point of view, you wouldn't want users to be able to see and mess with hidden windows that easily, that are configuring things, as inevitably, some users would end up closing it, and then end up logging incidents because something is no longer working.

@KG-droid commented on GitHub (Apr 29, 2023): > Hey @zadjii-msft! Now that we merged tearoff plus #14944 and #13478, we might have the right underpinnings to let console applications "hide" their windows. > > Mini-proposal (which should be fleshed out into a spec): > > A console application that hides its window should be detached from the pane/tab it's in and moved to a new tab in a hidden window. That window can show up in the tray icon list of windows, and users can show them if they want, but we won't have to present UI for it. If that console app was already the only tenant in a window (no panes/tabs), we could just mark that one hidden. Hi DHowett When you say "That window can show up in the tray icon list of windows", do you mean a user would be able to just click the icon in the tray/taskbar icons and re-open the hidden window? As ideally from a business point of view, you wouldn't want users to be able to see and mess with hidden windows that easily, that are configuring things, as inevitably, some users would end up closing it, and then end up logging incidents because something is no longer working.
Author
Owner

@MV10 commented on GitHub (Sep 30, 2023):

Request: Since all SW_HIDE related-issues get closed as duplicates of this thread, perhaps change this issue title to something not so Powershell-specific?

DHowett's idea makes the most sense to me: Hide the tab, and I'm with KG-droid, if we wanted users to mess with the window, we'd minimize it.

@MV10 commented on GitHub (Sep 30, 2023): Request: Since all `SW_HIDE` related-issues get closed as duplicates of this thread, perhaps change this issue title to something not so Powershell-specific? DHowett's idea makes the most sense to me: Hide the tab, and I'm with KG-droid, if we wanted users to mess with the window, we'd minimize it.
Author
Owner

@anuradhaedirisuriya commented on GitHub (Oct 11, 2024):

This is still true in Win 11. I need to go to settings and change default terminal application to "Windows Console Host"

Image

@anuradhaedirisuriya commented on GitHub (Oct 11, 2024): This is still true in Win 11. I need to go to settings and change default terminal application to "Windows Console Host" ![Image](https://github.com/user-attachments/assets/9ec186e6-242c-4ca3-9594-12b74cf31ff5)
Author
Owner

@czare commented on GitHub (Nov 14, 2024):

This is still true in Win 11. I need to go to settings and change default terminal application to "Windows Console Host"

Image

This seems like the right solution for our use case. Do you have any ideas on how to setup this option per GPO?

@czare commented on GitHub (Nov 14, 2024): > This is still true in Win 11. I need to go to settings and change default terminal application to "Windows Console Host" > > ![Image](https://github.com/user-attachments/assets/9ec186e6-242c-4ca3-9594-12b74cf31ff5) This seems like the right solution for our use case. Do you have any ideas on how to setup this option per GPO?
Author
Owner

@pavichokche commented on GitHub (Jan 10, 2025):

This important detail should be added to the documentation, since it still just mentions using --no-console as though it will work in modern Windows versions.

@pavichokche commented on GitHub (Jan 10, 2025): This important detail should be added to the documentation, since it still just mentions using --no-console as though it will work in modern Windows versions.
Author
Owner

@jflieben commented on GitHub (Feb 20, 2025):

For those reading this, using Intune you can auto-remediate this on managed W11 machines by forcing the old console as default:

https://github.com/jflieben/assortedFunctionsV2/tree/main/DefaultTerminalRemediation

@jflieben commented on GitHub (Feb 20, 2025): For those reading this, using Intune you can auto-remediate this on managed W11 machines by forcing the old console as default: https://github.com/jflieben/assortedFunctionsV2/tree/main/DefaultTerminalRemediation
Author
Owner

@alessiot89 commented on GitHub (Jun 8, 2025):

Bump this.
Other application devs are trying to workaround against this by getting back the HWND just calling immediately ShowWindow() just after calling SetForegroundWindow(). Except this isn't a fix (suggested by multiple source) but a wrong solution that may give the wrong HWND even of other applications with potential disaster. Please fix this. Windows terminal is basically default on many windows 11 systems and this is creating really annoying behaviours. Some anti-malware may also trigger such workaround behaviour as harmful.
This is not a minor bug, this is an API breaking things that you have to fix. Or, at least, provide a suitable easy solution for all 3rd party apps developers that wanna have SW_HIDE to work as intended, better to keep SW_HIDE to work as always has been.

@alessiot89 commented on GitHub (Jun 8, 2025): Bump this. Other application devs are trying to workaround against this by getting back the HWND just calling immediately ShowWindow() just after calling SetForegroundWindow(). Except this isn't a fix (suggested by multiple source) but a wrong solution that may give the wrong HWND even of other applications with potential disaster. Please fix this. Windows terminal is basically default on many windows 11 systems and this is creating really annoying behaviours. Some anti-malware may also trigger such workaround behaviour as harmful. This is not a minor bug, this is an API breaking things that you have to fix. Or, at least, provide a suitable easy solution for all 3rd party apps developers that wanna have SW_HIDE to work as intended, better to keep SW_HIDE to work as always has been.
Author
Owner

@madhanmaaz commented on GitHub (Jul 15, 2025):

Try this: test.bat

start /MIN powershell -WindowStyle Hidden -c "sleep 5; echo 'content' > success.txt"

https://github.com/user-attachments/assets/9676a60b-a1ec-4899-8516-a83f674c362a

@madhanmaaz commented on GitHub (Jul 15, 2025): Try this: `test.bat` ```bash start /MIN powershell -WindowStyle Hidden -c "sleep 5; echo 'content' > success.txt" ``` https://github.com/user-attachments/assets/9676a60b-a1ec-4899-8516-a83f674c362a
Author
Owner

@daikictrl commented on GitHub (Dec 21, 2025):

What then is then is the command to run background processes??

@daikictrl commented on GitHub (Dec 21, 2025): What then is then is the command to run background processes??
Author
Owner

@oldium commented on GitHub (Dec 21, 2025):

Try this: test.bat

start /MIN powershell -WindowStyle Hidden -c "sleep 5; echo 'content' > success.txt"
2025-07-15.13-09-04.mp4

Why should we try anything that does not work? What is the point actually?

Image
@oldium commented on GitHub (Dec 21, 2025): > Try this: `test.bat` > > start /MIN powershell -WindowStyle Hidden -c "sleep 5; echo 'content' > success.txt" > 2025-07-15.13-09-04.mp4 Why should we try anything that does not work? What is the point actually? <img width="825" height="505" alt="Image" src="https://github.com/user-attachments/assets/db62614c-52db-4cd5-b1b3-b8f0d6723b04" />
Author
Owner

@MV10 commented on GitHub (Dec 26, 2025):

Coming up on 4 years since this was reported and sequestered into the backlog.

Is anybody actually working on this?

@MV10 commented on GitHub (Dec 26, 2025): Coming up on 4 years since this was reported and sequestered into the backlog. Is anybody actually working on this?
Author
Owner

@KG-droid commented on GitHub (Dec 26, 2025):

Coming up on 4 years since this was reported and sequestered into the backlog.

Is anybody actually working on this?

Would also like to know this, in a business setting we just can't use terminal because of this.

@KG-droid commented on GitHub (Dec 26, 2025): > Coming up on 4 years since this was reported and sequestered into the backlog. > > Is anybody actually working on this? Would also like to know this, in a business setting we just can't use terminal because of this.
Author
Owner

@LbISS commented on GitHub (Jan 8, 2026):

Yeah, just've pent a day trying to understand why console applications are not minimized properly in the Win 11... I understand, that it's not possible to keep everything backward compatible. But would be great to have at least new API to work with the state of Windows Terminal. Otherwise it's just limiting the solution the developer can provide for Win 11 users.

@LbISS commented on GitHub (Jan 8, 2026): Yeah, just've pent a day trying to understand why console applications are not minimized properly in the Win 11... I understand, that it's not possible to keep everything backward compatible. But would be great to have at least new API to work with the state of Windows Terminal. Otherwise it's just limiting the solution the developer can provide for Win 11 users.
Author
Owner

@oldium commented on GitHub (Jan 8, 2026):

For anybody new in this thread, the actually working solution to hide the console window when starting up is to use conhost.exe - https://github.com/PowerShell/PowerShell/issues/3028#issuecomment-3557906405:

For example execute this from Windows Run (Ctrl+R):

C:\Windows\System32\conhost.exe --headless pwsh.exe -NoProfile -Command Sleep 10 

Use powershell.exe or pwsh.exe as you need.

Although this is not recommended by the maintainer of the conhost.exe, he have not provided any working alternative. So feel free to use this one until it breaks (it still works).

@oldium commented on GitHub (Jan 8, 2026): For anybody new in this thread, the actually working solution to hide the console window when starting up is to use `conhost.exe` - https://github.com/PowerShell/PowerShell/issues/3028#issuecomment-3557906405: For example execute this from Windows Run (Ctrl+R): ``` C:\Windows\System32\conhost.exe --headless pwsh.exe -NoProfile -Command Sleep 10 ``` Use `powershell.exe` or `pwsh.exe` as you need. Although this is not [recommended by the maintainer](https://github.com/PowerShell/PowerShell/issues/3028#issuecomment-2727865755) of the `conhost.exe`, he have not provided any working alternative. So feel free to use this one until it breaks (it still works).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16739