Set-BoxStarterTaskbarOptions - Parameter set cannot be resolved using the specified named parameters. #458
Labels
0 - Backlog
Issue is accepted, but is not ready to be worked on or not in current sprint
Bug
Issues where something has happened which was not expected or intended
Milestone
What You Are Seeing?
Set-BoxStarterTaskbarOptions uses Parameter Sets to enforce mutually exclusive parameters e.g.:
However, Powershell enforces that the provided arguments MUST conform to a SINGLE parameter set, so for the above parameters you can't provide
AlwaysShowIconsOn
ANDMultiMonitorOff
in the same command because there's no ParameterSet that supports both values.To resolve this,
MultiMonitorOff
(and all other params) would need to include parameter set names allowing it to be included the other parameter sets e.g.Unfortunately, this makes it possible to provide conflicting values.
Long story short, it's not easy to enforce multiple mutually exclusive parameter sets in a powershell function. Better to just enforce it in the implementation.
Of note is the fact that the second example doesn't work for me.
What Is Expected?
Any set of valid arguments should be accepted.
How Did You Get This To Happen? (Steps to Reproduce)
Output Log
The text was updated successfully, but these errors were encountered: