ValidateSet with String[]

Good morning,

Running into a problem with ValidateSet and string arrays. I think the issue is within the PSU platform where its not allowing single or multiple item selections from the set. Works fine outside of PSU.

Product: PowerShell Universal
Version: 1.4.6
[Parameter(Mandatory = $true, HelpMessage = "Groups the user should belong to")]


Sep 30, 2021 11:35 AM [error] Cannot validate argument on parameter ‘stringArr’. The argument ““sun”” does not belong to the set “sun,earth,moon” specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.


I opened and issue for this and we should be able to get this into the 2.4 release. ValidateSet with string[] not working · Issue #532 · ironmansoftware/issues · GitHub