Obtaining parameters with default value specified

Welcome Forums General PowerShell Q&A Obtaining parameters with default value specified

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 11 months ago.

  • Author
  • #15633

    Topics: 2
    Replies: 1
    Points: 0
    Rank: Member

    Is there an more appropriate way to go about getting a list of parameters and their values if that parameter is defined with a default value but not "bound" ?

    for an example see:

  • #15634

    Topics: 9
    Replies: 2322
    Points: 0
    Rank: Member

    Depends on how many parameters and parameter sets we're talking about. For the simple example with only one, I'd just do this:

    $PSBoundParameters['Members'] = $Members

    If it's a complex function with lots of sets and parameters, your way looks pretty good.

The topic ‘Obtaining parameters with default value specified’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort