René's URL Explorer Experiment


Title: Make error message consistent when invalid script is passed to -File, better error when passed ambiguous arg by SteveL-MSFT · Pull Request #4573 · PowerShell/PowerShell · GitHub

Open Graph Title: Make error message consistent when invalid script is passed to -File, better error when passed ambiguous arg by SteveL-MSFT · Pull Request #4573 · PowerShell/PowerShell

X Title: Make error message consistent when invalid script is passed to -File, better error when passed ambiguous arg by SteveL-MSFT · Pull Request #4573 · PowerShell/PowerShell

Description: Since -File is now the positional parameter for powershell.exe, made the error message consistent with -Command when passed an invalid file. If ambiguous arg is passed, give a better error message: PS C:\users\poker\repos\PowerShell> powershell -no -file foo Invalid argument '-no', did you mean: -nologo -noexit -noprofile -noninteractive PowerShell v6.0.0-beta.5-42-g3ed9a816b2452551aaad1ac1245a1cbb35e87612-dirty Copyright (C) Microsoft Corporation. All rights reserved. Enable -WindowStyle to work Fix #4351

Open Graph Description: Since -File is now the positional parameter for powershell.exe, made the error message consistent with -Command when passed an invalid file. If ambiguous arg is passed, give a better error message:...

X Description: Since -File is now the positional parameter for powershell.exe, made the error message consistent with -Command when passed an invalid file. If ambiguous arg is passed, give a better error message:...

Opengraph URL: https://github.com/PowerShell/PowerShell/pull/4573

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c88178e3-c9da-4cce-b752-0b61c7a07532
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC62C:2D74E4:185C397:217F565:6A572E82
html-safe-nonceb820a25a512a002d9465bb0033c65e94caf1b036472c7f49a4ef2e7c976ca22d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjJDOjJENzRFNDoxODVDMzk3OjIxN0Y1NjU6NkE1NzJFODIiLCJ2aXNpdG9yX2lkIjoiNjU3OTk2NDAwODkxNjc5MDkxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6a94444dd4ef5993fbf23392e98abd27c3bda91dc610f25b65c80c3237268269
hovercard-subject-tagpull_request:135705429
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/pull/4573/files
twitter:imagehttps://avatars.githubusercontent.com/u/11859881?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/11859881?s=400&v=4
og:image:altSince -File is now the positional parameter for powershell.exe, made the error message consistent with -Command when passed an invalid file. If ambiguous arg is passed, give a better error message:...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2576d1f0198cf1588faf2edf27f1ed120903be10
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/pull/4573/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fpull%2F4573%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fpull%2F4573%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/pull/4573/files
Reloadhttps://github.com/PowerShell/PowerShell/pull/4573/files
Reloadhttps://github.com/PowerShell/PowerShell/pull/4573/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
PowerShell https://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Fork 8.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Star 54.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Code https://github.com/PowerShell/PowerShell
Issues 1.2k https://github.com/PowerShell/PowerShell/issues
Pull requests 288 https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality 3 https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Code https://github.com/PowerShell/PowerShell
Issues https://github.com/PowerShell/PowerShell/issues
Pull requests https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FPowerShell%2FPowerShell%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPowerShell%2FPowerShell%2Fissues%2Fnew%2Fchoose
iSazonovhttps://github.com/iSazonov
PowerShell:masterhttps://github.com/PowerShell/PowerShell/tree/master
SteveL-MSFT:console-nohttps://github.com/SteveL-MSFT/PowerShell/tree/console-no
Conversation 33 https://github.com/PowerShell/PowerShell/pull/4573
Commits 3 https://github.com/PowerShell/PowerShell/pull/4573/commits
Checks 0 https://github.com/PowerShell/PowerShell/pull/4573/checks
Files changed https://github.com/PowerShell/PowerShell/pull/4573/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
Make error message consistent when invalid script is passed to -File, better error when passed ambiguous arg https://github.com/PowerShell/PowerShell/pull/4573/files#top
Show all changes 3 commits https://github.com/PowerShell/PowerShell/pull/4573/files
d9c63b7 Make invalid arg to -File consistent with -Command SteveL-MSFT Aug 16, 2017 https://github.com/PowerShell/PowerShell/pull/4573/commits/d9c63b72185646ad12e13fa64956c0292d43e79e
4c22b10 Update powershell console exit codes to match Unix standards SteveL-MSFT Aug 16, 2017 https://github.com/PowerShell/PowerShell/pull/4573/commits/4c22b10a383dc8efd21b748c2e4da8b15b9aa508
26f7db7 Enable -WindowStyle to work SteveL-MSFT Aug 16, 2017 https://github.com/PowerShell/PowerShell/pull/4573/commits/26f7db720cdeae9a2b3500e31186b75f33af6f51
Clear filters https://github.com/PowerShell/PowerShell/pull/4573/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
CommandLineParameterParser.cs https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
ConsoleControl.cs https://github.com/PowerShell/PowerShell/pull/4573/files#diff-07c41857192f559e83db49fb8c58091121e4606cff73e9e59b09c6efe605da4d
ConsoleHost.cs https://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
CommandLineParameterParserStrings.resx https://github.com/PowerShell/PowerShell/pull/4573/files#diff-b35851c42b0cb5dea9a90fd364f930cff43a013f37e0ef44855a3bf446ff79e7
ConsoleHost.Tests.ps1 https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cshttps://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
View file https://github.com/SteveL-MSFT/PowerShell/blob/26f7db720cdeae9a2b3500e31186b75f33af6f51/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/4573/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
iSazonovhttps://github.com/iSazonov
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133408178
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
SteveL-MSFThttps://github.com/SteveL-MSFT
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133412581
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
iSazonovhttps://github.com/iSazonov
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133417349
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-ecad051c48d5d76681e40007a13d92f2692b281e5e4485d722822e3ec1123718
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cshttps://github.com/PowerShell/PowerShell/pull/4573/files#diff-07c41857192f559e83db49fb8c58091121e4606cff73e9e59b09c6efe605da4d
View file https://github.com/SteveL-MSFT/PowerShell/blob/26f7db720cdeae9a2b3500e31186b75f33af6f51/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/4573/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-07c41857192f559e83db49fb8c58091121e4606cff73e9e59b09c6efe605da4d
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-07c41857192f559e83db49fb8c58091121e4606cff73e9e59b09c6efe605da4d
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cshttps://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
View file https://github.com/SteveL-MSFT/PowerShell/blob/26f7db720cdeae9a2b3500e31186b75f33af6f51/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/4573/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-3ba0ad52040bee05362fd1bd9f11eac7806d4a75bf06cd17b46c10e94d4ddd30
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
src/Microsoft.PowerShell.ConsoleHost/resources/CommandLineParameterParserStrings.resxhttps://github.com/PowerShell/PowerShell/pull/4573/files#diff-b35851c42b0cb5dea9a90fd364f930cff43a013f37e0ef44855a3bf446ff79e7
View file https://github.com/SteveL-MSFT/PowerShell/blob/26f7db720cdeae9a2b3500e31186b75f33af6f51/src/Microsoft.PowerShell.ConsoleHost/resources/CommandLineParameterParserStrings.resx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/4573/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-b35851c42b0cb5dea9a90fd364f930cff43a013f37e0ef44855a3bf446ff79e7
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-b35851c42b0cb5dea9a90fd364f930cff43a013f37e0ef44855a3bf446ff79e7
iSazonovhttps://github.com/iSazonov
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133411342
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
SteveL-MSFThttps://github.com/SteveL-MSFT
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133412441
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
iSazonovhttps://github.com/iSazonov
Aug 16, 2017https://github.com/PowerShell/PowerShell/pull/4573/files#r133417600
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/4573/files
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
test/powershell/Host/ConsoleHost.Tests.ps1https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
View file https://github.com/SteveL-MSFT/PowerShell/blob/26f7db720cdeae9a2b3500e31186b75f33af6f51/test/powershell/Host/ConsoleHost.Tests.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/4573/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
https://github.com/PowerShell/PowerShell/pull/4573/files#diff-e7ded27419b663fe7b2009703bab8b534fad75e179407d9fcc520bdd5ea7a5b6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.