Skip to content

Get-ParameterInfo misses IsDynamic parameters on aliases #101

Closed

Description

@ninmonkey

Describe the bug
Get-ParameterInfo misses IsDynamic parameters when using the alias name.

To Reproduce

PS> Get-ParameterInfo gc | ft Name, Aliases, IsDynamic, Type


Name        Aliases    IsDynamic Type
----        -------    --------- ----
ReadCount                  False System.Int64
TotalCount  First,Head     False System.Int64
Tail        Last           False System.Int32
Path                       False System.String[]
LiteralPath PSPath,LP      False System.String[]
Filter                     False System.String
Include                    False System.String[]
Exclude                    False System.String[]
Force                      False System.Management.Automation.SwitchParameter
Credential                 False System.Management.Automation.PSCredential

Expected behavior

PS> Get-ParameterInfo Get-Content | ft Name, Aliases, IsDynamic, Type


Name         Aliases    IsDynamic Type
----         -------    --------- ----
ReadCount                   False System.Int64
TotalCount   First,Head     False System.Int64
Tail         Last           False System.Int32
Path                        False System.String[]
LiteralPath  PSPath,LP      False System.String[]
Filter                      False System.String
Include                     False System.String[]
Exclude                     False System.String[]
Force                       False System.Management.Automation.SwitchParameter
Credential                  False System.Management.Automation.PSCredential
Delimiter                    True System.String
Wait                         True System.Management.Automation.SwitchParameter
Raw                          True System.Management.Automation.SwitchParameter
Encoding                     True System.Text.Encoding
AsByteStream                 True System.Management.Automation.SwitchParameter
Stream                       True System.String

Desktop (please complete the following information):

  • win10: 2004
  • Module Version: 2.31.0
  • PowerShell Version: 7.1.0

Activity

  1. jdhitsolutions commented on Jan 21, 2021

    @jdhitsolutions
    Owner

    That is an interesting bug.

  2. jdhitsolutions commented on Jan 21, 2021

    @jdhitsolutions
    Owner

    Not too difficult to fix. Working on a new release. Of course, the workaround, for now, is to use the command name and not an alias.

  3. added
    in progress
    on Jan 21, 2021
  4. jdhitsolutions commented on Jan 21, 2021

    @jdhitsolutions
    Owner

    This should be fixed in v2.34.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugin progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions