Title: Powershell -WindowStyle Hidden still shows a window briefly · Issue #3028 · PowerShell/PowerShell · GitHub
Open Graph Title: Powershell -WindowStyle Hidden still shows a window briefly · Issue #3028 · PowerShell/PowerShell
X Title: Powershell -WindowStyle Hidden still shows a window briefly · Issue #3028 · PowerShell/PowerShell
Description: Steps to reproduce In Windows Run dialog type this: PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.com Expected behavior There should be no window, right now you can't start powershell without window flashing, making it r...
Open Graph Description: Steps to reproduce In Windows Run dialog type this: PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.com Expected behavior There should be no window, right now you can't start powersh...
X Description: Steps to reproduce In Windows Run dialog type this: PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.com Expected behavior There should be no window, right now you can't start pow...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3028
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Powershell -WindowStyle Hidden still shows a window briefly","articleBody":"\u003c!--\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](../docs/FAQ.md).\r\n- Refer to the [known issues](../docs/KNOWNISSUES.md).\r\n- Fill out the following repro template\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n--\u003e\r\n\r\nSteps to reproduce\r\n------------------\r\nIn Windows Run dialog type this:\r\n`PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.com`\r\n\r\nExpected behavior\r\n-----------------\r\nThere should be no window, right now you can't start powershell without window flashing, making it rather useless e.g. for scheduled tasks.\r\n\r\n*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:\r\n\r\n```\r\nDim shell,command\r\ncommand = \"powershell.exe -nologo -File D:\\myscript.ps1\"\r\nSet shell = CreateObject(\"WScript.Shell\")\r\nshell.Run command,0\r\n```\r\n\r\nThis 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.\r\n\r\nActual behavior\r\n---------------\r\nIt flashes the powershell window briefly.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 5.1.14393.693\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 10.0.14393.693\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n```\r\n","author":{"url":"https://github.com/Ciantic","@type":"Person","name":"Ciantic"},"datePublished":"2017-01-22T18:49:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":134},"url":"https://github.com/3028/PowerShell/issues/3028"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:32a6e60c-10c1-cf1b-b604-f358b9765916 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B8C:41260:1741F7A:21D8BDD:6A4E4F41 |
| html-safe-nonce | f9e236318da7cbeada75837d915f7732f99e4202e804a0932e8b9513031e05ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjhDOjQxMjYwOjE3NDFGN0E6MjFEOEJERDo2QTRFNEY0MSIsInZpc2l0b3JfaWQiOiI1MTY5NDQ0ODc4NTg5Nzc1NjgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 641aa4864ca86852406d10fe619ec15ddda98ab910f98170678d38d69005cb8d |
| hovercard-subject-tag | issue:202401270 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3028/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eb9a1c9bfb67056a40605e0e5aec8813deba5ea04591cae855932cc5966df601/PowerShell/PowerShell/issues/3028 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eb9a1c9bfb67056a40605e0e5aec8813deba5ea04591cae855932cc5966df601/PowerShell/PowerShell/issues/3028 |
| og:image:alt | Steps to reproduce In Windows Run dialog type this: PowerShell.exe -WindowStyle Hidden -Command ping www.microsoft.com Expected behavior There should be no window, right now you can't start powersh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Ciantic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width