Skip to content

Assert-BoundParameters: Allow parameter IfEqualParameterList <Hashtable> #160

@johlju

Description

@johlju

Problem description

Suggest to add a parameter that will only do the check if the corresponding properties in BoundParameterList has the specified values.

That would for exampe allow this; only assert when Ensure is set to 'Present':

Assert-BoundParameter `
  -BoundParameterList $properties `
  -MutuallyExclusiveList1 @('Severity') `
  -MutuallyExclusiveList2 @('MessageId') `
  -IfEqualParameterList @{Ensure='Present'}

Verbose logs

n/a

How to reproduce

n/a

Expected behavior

n/a

Current behavior

n/a

Suggested solution

See above. Suggest to add it to both parameter sets; MutuallyExclusiveParameters and RequiredParameter.

Operating system the target node is running

n/a

PowerShell version and build the target node is running

n/a

Module version used

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.good first issueThe issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions