René's URL Explorer Experiment


Title: PowerShell Scripts require .ps1 extension · Issue #1103 · PowerShell/PowerShell · GitHub

Open Graph Title: PowerShell Scripts require .ps1 extension · Issue #1103 · PowerShell/PowerShell

X Title: PowerShell Scripts require .ps1 extension · Issue #1103 · PowerShell/PowerShell

Description: Scripts (on linux) don't function unless they have the extension .ps1 (generally, languages do not require specific extensions in Linux when using shebang to start them #! /usr/bin/powershell Steps to reproduce File: myscript #!/usr/bin/...

Open Graph Description: Scripts (on linux) don't function unless they have the extension .ps1 (generally, languages do not require specific extensions in Linux when using shebang to start them #! /usr/bin/powershell Steps...

X Description: Scripts (on linux) don't function unless they have the extension .ps1 (generally, languages do not require specific extensions in Linux when using shebang to start them #! /usr/bin/powershell S...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/1103

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PowerShell Scripts require .ps1 extension","articleBody":"Scripts (on linux) don't function unless they have the extension `.ps1` (generally, languages do not require specific extensions in Linux when using shebang to start them `#! /usr/bin/powershell`\n## Steps to reproduce\n\nFile: `myscript`\n\n``` powershell\n#!/usr/bin/powershell\necho hi\n```\n\n``` bash\nchmod a+x ./myscript\n\n# hangs!\n./myscript \n\n\nmv ./myscript ./myscript.ps1\n\n# works\n./myscript.ps1\nhi\n\n```\n## Expected behavior\n\nOn linux, this should work even if the extension isn't `.ps1`\n## Actual behavior\n\n**EDIT** \nit turns out it didn't hang, it fails:\n\n``` text\nSystem.TypeInitializationException: The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Reflection.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An internal error occurred.\n (Exception from HRESULT: 0x8007054F)\n   at System.Reflection.Internal.LightUpHelper.GetMethod(Type type, String name, Type[] parameterTypes)\n   at System.Reflection.Internal.MemoryMapLightUp.TryLoadMembers()\n   at System.Reflection.Internal.MemoryMapLightUp.get_IsAvailable()\n   at System.Reflection.Internal.StreamMemoryBlockProvider..ctor(Stream stream, Int64 imageStart, Int32 imageSize, Boolean isFileStream, Boolean leaveOpen)\n   at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Nullable`1 sizeOpt)\n   at System.Diagnostics.FileVersionInfo.TryLoadManagedAssemblyMetadata()\n   at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)\n   at System.Management.Automation.PSVersionInfo.GetBuildVersion()\n   at System.Management.Automation.PSVersionInfo..cctor()\n   --- End of inner exception stack trace ---\n   at System.Management.Automation.PSVersionInfo.get_PSVersion()\n   at System.Management.Automation.PSSnapInReader.ReadRegistryInfo(Version& assemblyVersion, String& publicKeyToken, String& culture, String& architecture, String& applicationBase, Version& psVersion)\n   at System.Management.Automation.PSSnapInReader.ReadCoreEngineSnapIn()\n   at System.Management.Automation.Runspaces.InitialSessionState.ImportCorePSSnapIn()\n   at System.Management.Automation.Runspaces.InitialSessionState.CreateDefault2()\n   at Microsoft.PowerShell.UnmanagedPSEntry.Start(String consoleFilePath, String[] args, Int32 argc)\n   at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)\n\n```\n## Environment data\n\nv0.4.0\n","author":{"url":"https://github.com/fearthecowboy","@type":"Person","name":"fearthecowboy"},"datePublished":"2016-06-14T16:25:15Z","url":"https://github.com/PowerShell/PowerShell/issues/1103"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4e7e6ae0-fa0b-d475-b9de-60b7326f01b5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idADA2:3B38CF:25E8ACA:34DDDC2:6AFD431F
html-safe-nonce346e5abb8a7520e846944ca149b84d61e117d0d10237cd69452cb235a26f2df2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREEyOjNCMzhDRjoyNUU4QUNBOjM0REREQzI6NkFGRDQzMUYiLCJ2aXNpdG9yX2lkIjoiNDA2Mjc1NDgwMTQwMDQ5NjkyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac63009a7e1acc6e049474d8477c0b2d028c8aad4e932155fa987ba3f0c87ce6a6
hovercard-subject-tagissue:160225324
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/1103/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9d1c175e9ec3e1b3aa64077b2ce4f615bc2497a2e1925cca0cb4b4435a6e22ea/PowerShell/PowerShell/issues/1103
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9d1c175e9ec3e1b3aa64077b2ce4f615bc2497a2e1925cca0cb4b4435a6e22ea/PowerShell/PowerShell/issues/1103
og:image:altScripts (on linux) don't function unless they have the extension .ps1 (generally, languages do not require specific extensions in Linux when using shebang to start them #! /usr/bin/powershell Steps...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefearthecowboy
hostnamegithub.com
expected-hostnamegithub.com
Nonebdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release556dd37bb0aceffb25724e151b5d858b3265b40b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/1103#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F1103
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F1103
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/1103
Reloadhttps://github.com/PowerShell/PowerShell/issues/1103
Reloadhttps://github.com/PowerShell/PowerShell/issues/1103
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests364 (364)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/1103
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/1103
PowerShell Scripts require .ps1 extensionhttps://github.com/PowerShell/PowerShell/issues/1103#top
https://github.com/SteveL-MSFT
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
OS-Linuxhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22OS-Linux%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Usability%22
6.0.0-GAhttps://github.com/PowerShell/PowerShell/milestone/27
https://github.com/fearthecowboy
Garrett Serack (fearthecowboy)https://github.com/fearthecowboy
on Jun 14, 2016https://github.com/PowerShell/PowerShell/issues/1103#issue-160225324
Nexthttps://github.com/PowerShell/PowerShell/issues/1103?timeline_page=1
Andy Jordan (andyleejordan)https://github.com/andyleejordan
Aug17https://github.com/PowerShell/PowerShell/milestone/7
on Jun 16, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-695262911
https://github.com/andyleejordan
Andy Jordan (andyleejordan)https://github.com/andyleejordan
on Jun 16, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-226623638
Andy Jordan (andyleejordan)https://github.com/andyleejordan
Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Usability%22
on Jun 16, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-695265664
A (ealexjordan)https://github.com/ealexjordan
on Jun 22, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-700782307
Joey Aiello (joeyaiello)https://github.com/joeyaiello
in progresshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22in%20progress%22
on Jun 27, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-705331652
Hemant Mahawar (HemantMahawar)https://github.com/HemantMahawar
cut-aug17https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22cut-aug17%22
on Jul 15, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-724918714
Hemant Mahawar (HemantMahawar)https://github.com/HemantMahawar
Aug17https://github.com/PowerShell/PowerShell/milestone/7
Futurehttps://github.com/PowerShell/PowerShell/milestone/48
on Jul 20, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-729669726
sergei (vors)https://github.com/vors
cut-aug17https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22cut-aug17%22
on Jul 21, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-730588624
https://github.com/giggio
Giovanni Bassi (giggio)https://github.com/giggio
on Aug 19, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-240904994
Andy Jordan (andyleejordan)https://github.com/andyleejordan
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
on Aug 19, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-760725858
Hemant Mahawar (HemantMahawar)https://github.com/HemantMahawar
post-6.0.0https://github.com/PowerShell/PowerShell/milestone/11
on Oct 17, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-826710410
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
on Dec 1, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-879255954
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Dec 1, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-264319715
https://github.com/RamblingCookieMonster
Warren Frame (RamblingCookieMonster)https://github.com/RamblingCookieMonster
on Dec 2, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-264372970
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Dec 2, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-264514003
Warren Frame (@RamblingCookieMonster)https://github.com/RamblingCookieMonster
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Discussion%22
on Dec 8, 2016https://github.com/PowerShell/PowerShell/issues/1103#event-887201816
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Dec 8, 2016https://github.com/PowerShell/PowerShell/issues/1103#issuecomment-265801360
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
A (ealexjordan)https://github.com/ealexjordan
on Mar 28, 2017https://github.com/PowerShell/PowerShell/issues/1103#event-1019003916
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Jun 8, 2017https://github.com/PowerShell/PowerShell/issues/1103#event-1115853589
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Jun 8, 2017https://github.com/PowerShell/PowerShell/issues/1103#event-1115853656
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4019https://github.com/PowerShell/PowerShell/pull/4019
on Jun 19, 2017https://github.com/PowerShell/PowerShell/issues/1103#event-1129723005
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
on Jun 19, 2017https://github.com/PowerShell/PowerShell/issues/1103#event-1129723353
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/1103
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/1103
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Issue-BugIssue has been identified as a bug in the producthttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Bug%22
OS-Linuxhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22OS-Linux%22
Resolution-FixedThe issue is fixed.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Fixed%22
Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Usability%22
6.0.0-GAhttps://github.com/PowerShell/PowerShell/milestone/27
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.