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:
Create a schedule, observe that initially the schedule can be edited and the value remains 30.
Reload schedules.ps1 configuration file from Settings > Files
Wait several seconds for schedules to be reloaded complete
Edit the schedule and observe the value is now 0 (Note that the schedules.ps1 still reflects 30)
Weirdness on [string[]] params - Example 1
Example Script:
param( [string[]] $MultipleStrings = @( 'test', 'test' ) )Repro:
Create a schedule, observe that the default value is not filled in
Enter test and press enter to fill in value
Enter test again, note that you cannot fill in the same value twice
Weirdness on [string[]] params - Example 2
Example Script:
param( [string[]] $MultipleStrings = @( 'test1', 'test2' ) )Repro:
Create a schedule, observe that the default value is not filled in
Enter multiple values pressing enter after each to add to list
Save the schedule
Observer "An Error Occured" appears instead of the schedules page
Refresh
Observe that the schedule was created and parameters are populated
Edit the schedule, remove values and save
Observe that the schedule was updated
Edit the schedule, add a value and press enter to add it to the list
Observe that the parent page shows "An Error Occurred" but that the form is not dismissed, page is unresponsive
Weirdness on [string[]] params - Example 3
Example Script:
param( [ValidateSet( 'test1', 'test2' )][string[]] $MultipleStrings = @( 'test1', 'test2' ) )Repro:
Create a schedule, observe that the default value is not filled in
Enter multiple valid values choosing from the drop down or typing in and pressing enter
Save the schedule
Edit the schedule, remove the last value
Observe that the drop down now only shows the first value as an option
Save the schedule
Edit the schedule, remove all values
Observe that the drop down has no options
Manually re-enter a valid value and press enter
Observe that the parent page shows "An Error Occurred" but that the form is not dismissed, page is unresponsive
Weirdness on [pscredential] params
Example Script:
param( [pscredential] $ExampleCredential )Repro:
Create a schedule filling in the credential parameter
Save the schedule
Observe that the schedule can be edited and the parameter remains filled
Reload the schedules.ps1 file
Observe that the parameter is now empty when editing the schedule
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!