-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Powershell -WindowStyle Hidden still shows a window briefly #3028
Copy link
Copy link
Open
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeOS-WindowsWG-Interactive-Consolethe console experiencethe console experienceWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
Milestone
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeOS-WindowsWG-Interactive-Consolethe console experiencethe console experienceWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
Steps to reproduce
In Windows Run dialog type this:
PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.comExpected behavior
There should be no window, right now you can't start powershell without window flashing, making it rather useless e.g. for scheduled tasks.
Note I think this is intended behavior, but it's confusing and new option is probably required. If you search how to run a powershell in scheduled task, the go-to workaround is to do a vbs script of all things! Such as:
This is not a good thing, powershell needs this feature in the shell itself, scheduled tasks are important feature and having a window flash on scheduled task is a really bad experience.
Actual behavior
It flashes the powershell window briefly.
Environment data