Multi-string script parameters don't show options, throw error
I have many scripts that have an array type (i.e. [string[]]) with a ValidateSet decorator. In the latest release when I'm editing existing schedules the set parameters don't populate and the drop down selector is not working.
Hello @realslacker
Thank you for reporting this.
I understand that when editing existing schedules, parameters defined as [string[]] with a ValidateSet are no longer populating their previously selected values and the dropdown selector is not working correctly.
To help us narrow this down, could you please provide:
• Your exact PowerShell Universal version and build.
• The last PSU version where this worked correctly, if known.
• A minimal example of the affected parameter definition, preferably just the relevant param() block.
• The exact error message or a screenshot showing the error.
• Whether creating a new schedule works correctly and the problem only occurs when editing an existing schedule.
Once we have those details, we can compare the behavior and determine whether we can reproduce it consistently.
Because this is a public forum, please sanitize all evidence before posting. Remove credentials, tokens, license keys, cookies, private keys, full connection strings, email addresses, usernames, customer data, tenant or account identifiers, internal domains, hostnames, IP addresses, and private URLs. Please do not upload unredacted HAR files, memory dumps, database backups, or complete configuration files to this public thread.
Best regards,
Ruben Tapia
I'm seeing these all on version 2026.2.5.
Weirdness on [int] params
Example Script:
param( [int] $IntParam = 30 )
Repro:
Weirdness on [string[]] params - Example 1
Example Script:
param( [string[]] $MultipleStrings = @( 'test', 'test' ) )
Repro:
Weirdness on [string[]] params - Example 2
Example Script:
param( [string[]] $MultipleStrings = @( 'test1', 'test2' ) )
Repro:
Weirdness on [string[]] params - Example 3
Example Script:
param( [ValidateSet( 'test1', 'test2' )][string[]] $MultipleStrings = @( 'test1', 'test2' ) )
Repro:
Weirdness on [pscredential] params
Example Script:
param( [pscredential] $ExampleCredential )
Repro:
The UI also seems very sluggish to load schedules and scripts. I'm migrating from v4 and it's so much slower...
I'm also noticing that [string[]] parameters with multiple value defaults are not populated when running a script unless the ValidateSet is used.
I've opened a ticket to investigate this. It seems fairly straightforward, but we will circle back if we need more information. Thank you!