Skip to content

Find-PSResource -CommandName is case-sensitive #920

@sdwheeler

Description

@sdwheeler

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

When searching for a resource by CommandName you must specify the name using the correct case.

Find-PSResource -CommandName new-markdownhelp -ModuleName platyps
Find-PSResource -CommandName New-MarkdownHelp -ModuleName platyps

Name             ParentResource
----             --------------
New-MarkdownHelp Microsoft.PowerShell.PowerShellGet.UtilClasses.PSResourceInfo

Expected behavior

The search should be case-insensitive.

Actual behavior

You must know the case of the command name.

This can be a problem when you don't know how the module author named the command. This could be especially problematic for Az cmdlets that don't always follow the Pascal-case naming pattern.

Error details

No response

Environment data

$PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      3      2

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     3.0.19     beta19     powershellget                       {Find-PSResource, Get-PSResource, Get-PSResourceR

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions