You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think paramtersetname is working correctly.
When using parametersets the mandatory setting validation is taking priority over the parametersets.
The below param setting should make C mandatory if using A and optional if using B. Currently all 3 are mandatory and that results in an "AmbiguousParameterSet" error on submit.
ParameterSetName is not supported. Depending on your use case, it can be made to work, without the mandatory fields and doing validation within the function.
I don't think paramtersetname is working correctly.
When using parametersets the mandatory setting validation is taking priority over the parametersets.
The below param setting should make C mandatory if using A and optional if using B. Currently all 3 are mandatory and that results in an "AmbiguousParameterSet" error on submit.
param
(
[parameter(ParameterSetName="AandC", mandatory=$true)]
[switch]$a,
[parameter(ParameterSetName="BandC", mandatory=$true)]
[switch]$b,
[parameter(ParameterSetName="AandC", mandatory=$true)]
[parameter(ParameterSetName="BandC", mandatory=$false)]
[switch]$c
}
The text was updated successfully, but these errors were encountered: