René's URL Explorer Experiment


Title: Get-Module [-ListAvailable] -FullyQualifiedName with path ignores other constraints · Issue #8262 · PowerShell/PowerShell · GitHub

Open Graph Title: Get-Module [-ListAvailable] -FullyQualifiedName with path ignores other constraints · Issue #8262 · PowerShell/PowerShell

X Title: Get-Module [-ListAvailable] -FullyQualifiedName with path ignores other constraints · Issue #8262 · PowerShell/PowerShell

Description: From #8218. Get-Module using a path in a fully qualified name will skip other constraints in the fully qualified name and be too permissive. Steps to reproduce Describe 'Get-Module -ListAvailable with path' { BeforeAll { $moduleName = 'B...

Open Graph Description: From #8218. Get-Module using a path in a fully qualified name will skip other constraints in the fully qualified name and be too permissive. Steps to reproduce Describe 'Get-Module -ListAvailable w...

X Description: From #8218. Get-Module using a path in a fully qualified name will skip other constraints in the fully qualified name and be too permissive. Steps to reproduce Describe 'Get-Module -ListAvailab...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Module [-ListAvailable] -FullyQualifiedName with path ignores other constraints","articleBody":"From https://github.com/PowerShell/PowerShell/pull/8218.\r\n\r\n`Get-Module` using a path in a fully qualified name will skip other constraints in the fully qualified name and be too permissive.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\nDescribe 'Get-Module -ListAvailable with path' {\r\n    BeforeAll {\r\n        $moduleName = 'Banana'\r\n        $modulePath = Join-Path $TestDrive $moduleName\r\n        $v1 = '1.2.3'\r\n        $v2 = '4.8.3'\r\n        $v1DirPath = Join-Path $modulePath $v1\r\n        $v2DirPath = Join-Path $modulePath $v2\r\n        $manifestV1Path = Join-Path $v1DirPath \"$moduleName.psd1\"\r\n        $manifestV2Path = Join-Path $v2DirPath \"$moduleName.psd1\"\r\n\r\n        New-Item -ItemType Directory $modulePath\r\n        New-Item -ItemType Directory -Path $v1DirPath\r\n        New-Item -ItemType Directory -Path $v2DirPath\r\n        New-ModuleManifest -Path $manifestV1Path -ModuleVersion $v1\r\n        New-ModuleManifest -Path $manifestV2Path -ModuleVersion $v2\r\n    }\r\n\r\n    It \"Gets all versions by path\" {\r\n        $modules = Get-Module -ListAvailable $modulePath | Sort-Object -Property Version\r\n\r\n        $modules | Should -HaveCount 2\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $manifestV1Path\r\n        $modules[0].Version | Should -Be $v1\r\n        $modules[1].Name | Should -BeExactly $moduleName\r\n        $modules[1].Path | Should -BeExactly $manifestV2Path\r\n        $modules[1].Version | Should -Be $v2\r\n    }\r\n\r\n    It \"Gets all versions by FullyQualifiedName with path with lower version\" {\r\n        $modules = Get-Module -ListAvailable -FullyQualifiedName @{ ModuleName = $modulePath; ModuleVersion = '0.0' } | Sort-Object -Property Version\r\n\r\n        $modules | Should -HaveCount 2\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $manifestV1Path\r\n        $modules[0].Version | Should -Be $v1\r\n        $modules[1].Name | Should -BeExactly $moduleName\r\n        $modules[1].Path | Should -BeExactly $manifestV2Path\r\n        $modules[1].Version | Should -Be $v2\r\n    }\r\n\r\n    It \"Gets high version by FullyQualifiedName with path with high version\" {\r\n        $modules = Get-Module -ListAvailable -FullyQualifiedName @{ ModuleName = $modulePath; ModuleVersion = '2.0' } | Sort-Object -Property Version\r\n\r\n        $modules | Should -HaveCount 1\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $manifestV2Path\r\n        $modules[0].Version | Should -Be $v2\r\n    }\r\n\r\n    It \"Gets low version by FullyQualifiedName with path with low maximum version\" {\r\n        $modules = Get-Module -ListAvailable -FullyQualifiedName @{ ModuleName = $modulePath; MaximumVersion = '2.0' } | Sort-Object -Property Version\r\n\r\n        $modules | Should -HaveCount 1\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $manifestV1Path\r\n        $modules[0].Version | Should -Be $v1\r\n    }\r\n\r\n    It \"Gets low version by FullyQualifiedName with path with low maximum version and version\" {\r\n        $modules = Get-Module -ListAvailable -FullyQualifiedName @{ ModuleName = $modulePath; MaximumVersion = '2.0'; ModuleVersion = '1.0' } | Sort-Object -Property Version\r\n\r\n        $modules | Should -HaveCount 1\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $manifestV1Path\r\n        $modules[0].Version | Should -Be $v1\r\n    }\r\n\r\n    It \"Gets correct version by FullyQualifiedName with path with required version\" -TestCases @(\r\n        @{ Version = $v1 }\r\n        @{ Version = $v2 }\r\n    ) {\r\n        param([version]$Version)\r\n\r\n        switch ($Version)\r\n        {\r\n            $v1\r\n            {\r\n                $expectedPath = $manifestV1Path\r\n                break\r\n            }\r\n\r\n            $v2\r\n            {\r\n                $expectedPath = $manifestV2Path\r\n            }\r\n        }\r\n\r\n        $modules = Get-Module -ListAvailable -FullyQualifiedName @{ ModuleName = $modulePath; RequiredVersion = $Version }\r\n\r\n        $modules | Should -HaveCount 1\r\n        $modules[0].Name | Should -BeExactly $moduleName\r\n        $modules[0].Path | Should -BeExactly $expectedPath\r\n        $modules[0].Version | Should -Be $Version\r\n    }\r\n}\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nAll tests pass\r\n\r\nActual behavior\r\n---------------\r\n\r\nTests with additional version checks in fully qualified names have their checks ignored.\r\nThis is of the following code:\r\n\r\nhttps://github.com/PowerShell/PowerShell/blob/79f21b41de0de9b2f68a19ba1fdef0b98f3fb1cb/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs#L547-L557\r\n\r\nWhen a path is specified, the lookup fails and we (perversely) return the module.","author":{"url":"https://github.com/rjmholt","@type":"Person","name":"rjmholt"},"datePublished":"2018-11-14T00:26:48Z","url":"https://github.com/PowerShell/PowerShell/issues/8262"}

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:0085d0b9-b0a7-3534-8d55-40a8c53df78c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEBB6:25F138:2394DA:305A18:6AFD5297
html-safe-nonce5a03dd47c15e437b826c2a29dc1da897ebedcd8f9b6bcc63b63651b082f041fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkI2OjI1RjEzODoyMzk0REE6MzA1QTE4OjZBRkQ1Mjk3IiwidmlzaXRvcl9pZCI6IjU0OTYzOTQ0NzA4MjU3NDI5OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8287436405e60800c7de789a6a578bd14f5fab632284f55c0a1464639190a85c
hovercard-subject-tagissue:380483587
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/8262/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5cb8050308fe2624083aa47f3ef856c3d061fb170f328701b4042787b26ebdc5/PowerShell/PowerShell/issues/8262
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5cb8050308fe2624083aa47f3ef856c3d061fb170f328701b4042787b26ebdc5/PowerShell/PowerShell/issues/8262
og:image:altFrom #8218. Get-Module using a path in a fully qualified name will skip other constraints in the fully qualified name and be too permissive. Steps to reproduce Describe 'Get-Module -ListAvailable w...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerjmholt
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
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
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/8262#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F8262
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%2F8262
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/8262
Reloadhttps://github.com/PowerShell/PowerShell/issues/8262
Reloadhttps://github.com/PowerShell/PowerShell/issues/8262
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 requests365 (365)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/8262
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/8262
Get-Module [-ListAvailable] -FullyQualifiedName with path ignores other constraintshttps://github.com/PowerShell/PowerShell/issues/8262#top
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Cmdletsgeneral cmdlet issueshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets%22
https://github.com/rjmholt
Rob Holt (rjmholt)https://github.com/rjmholt
on Nov 14, 2018https://github.com/PowerShell/PowerShell/issues/8262#issue-380483587
#8218https://github.com/PowerShell/PowerShell/pull/8218
PowerShell/src/System.Management.Automation/engine/Modules/GetModuleCommand.cshttps://github.com/PowerShell/PowerShell/blob/79f21b41de0de9b2f68a19ba1fdef0b98f3fb1cb/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs#L547-L557
79f21b4https://github.com/PowerShell/PowerShell/commit/79f21b41de0de9b2f68a19ba1fdef0b98f3fb1cb
Ilya (iSazonov)https://github.com/iSazonov
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Area-Cmdlets-Corehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Area-Cmdlets-Core%22
on Nov 14, 2018https://github.com/PowerShell/PowerShell/issues/8262#event-1965625841
https://github.com/rjmholt
Rob Holt (rjmholt)https://github.com/rjmholt
on Nov 14, 2018https://github.com/PowerShell/PowerShell/issues/8262#issuecomment-438791711
Dongbo Wang (@daxian-dbw)https://github.com/daxian-dbw
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/8262#issuecomment-1813882982
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/8262#issuecomment-1813882984
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/8262#issuecomment-1813882986
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/8262#event-10976473447
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 23, 2023https://github.com/PowerShell/PowerShell/issues/8262#issuecomment-1824378627
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 23, 2023https://github.com/PowerShell/PowerShell/issues/8262#event-11047345580
Ryan Yates (kilasuit)https://github.com/kilasuit
WG-Cmdletsgeneral cmdlet issueshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets%22
WG-Cmdlets-Corehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets-Core%22
on Jul 17, 2026https://github.com/PowerShell/PowerShell/issues/8262#event-28145158312
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/8262
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/8262
Issue-Enhancementthe issue is more of a feature request than a bughttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Enhancement%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Cmdletsgeneral cmdlet issueshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Cmdlets%22
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.