question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WindowStyle Hidden broke after update to PowerShell v7.2.7

See original GitHub issue

Prerequisites

  • 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:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bkoelmancommented, Nov 8, 2022

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.

0reactions
StevenBucher98commented, Nov 8, 2022

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!

Read more comments on GitHub >

github_iconTop 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 >
Installing PowerShell on Windows
Information about installing PowerShell on Windows.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found