You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have a drop-down field that lists available values from a variable dataset
E.g. "Please Select an Active Directory Users:"
Drop-down list that shows all Active Directory Users (Derived from a "Get-ADUser" output)
I thought perhaps i could use the on-load script to run my Get-ADUser command and store the options in an array variable that could be passed to the actual script, but that doesn't work in any way.
The only thing i can think of at this point is to have the on-load script actually Edit/Modify the script itself to replace the validateset with my requirements, but that seems unrulely.
When i attempt something like this, the option is just presented as "$Users" (explicit string). Is there a way to Expand this into an actual list of User names?
[Parameter(Mandatory, HelpMessage='Select A User:')]
[ValidateSet($Users)]
[string]$User
The text was updated successfully, but these errors were encountered:
I would like to have a drop-down field that lists available values from a variable dataset
E.g. "Please Select an Active Directory Users:"
I thought perhaps i could use the on-load script to run my Get-ADUser command and store the options in an array variable that could be passed to the actual script, but that doesn't work in any way.
The only thing i can think of at this point is to have the on-load script actually Edit/Modify the script itself to replace the validateset with my requirements, but that seems unrulely.
When i attempt something like this, the option is just presented as "$Users" (explicit string). Is there a way to Expand this into an actual list of User names?
The text was updated successfully, but these errors were encountered: