I want to achieve the following in my parameter sets:
function [A | B] [C | D] (E) (F)
In English as concise as possible, I would like A, B, C and D to be Manadatory=$true
but A and B can't be in the same command nor can C and D. E and F will always be optional.
I figured I could expand this with multiple ParameterSetName
attributes following the below logic:
function A C (E) (F)
function A D (E) (F)
function B C (E) (F)
function B D (E) (F)
However the below sentence says each parameter set must have a unqiue parameter, but as you can see I use A and B twice each. The only way for the PowerShell runtime to identify them as unique parameter sets is by looking at two paremters, not just one.
Each parameter set must have a unique parameter that the Windows PowerShell runtime can use to expose the appropriate parameter set
Is there some way to achieve this?