WindowStyle Hidden broke after update to PowerShell v7.2.7
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
The next shortcut on my desktop used to start the specified script without opening a console window. After updating to PowerShell v7.2.7, the console window always appears and remains visible.
“C:\Program Files\PowerShell\7\pwsh.exe” -WindowStyle Hidden “c:\path\to\script.ps1”
Expected behavior
Console window is hidden.
Actual behavior
Console window appears and remains visible.
Error details
No response
Environment data
OS: Windows 11 Pro 22H2, build 22621.675
Version
PowerShell v7.2.7
Visuals
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
PowerShell: "-windowstyle hidden" breaks otherwise ...
I have a relatively simple request: I have a small script that I want to be able to paste into the "run" dialogue...
Read more >powershell-core (Install) 7.1.4
You have pwsh v7.2.7 installed. Version 7.3.0 is available based on your source(s). pwsh not upgraded. An error occurred during installation: Unable ...
Read more >PowerShell 7.2.7 and 7.0.13 has been released
v7.0.13 Release of PowerShell Engine Updates and Fixes Stop sending telemetry about ApplicationType ... Windows Terminal knows about v7.2.7
Read more >Using PowerShell 7 in the Windows PowerShell ISE
Learn how to configure PowerGUI to use PowerShell 5 and 7.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wow, that’s a well-hidden setting! I’ve been searching for something like that. It was set to “Let Windows decide”. After changing to “Windows Console Host”, the problem went away.
Thanks for your help. Do you have any idea what caused this change? I’m asking because on my work laptop I also upgraded PowerShell, but did not observe the switch to using Windows Terminal there.
Hard to say exactly what may have caused it 🤷 very likely was not PowerShell and possibly some Windows update that made that change. Glad to hear problem went away!