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
{{ message }}
Repository navigation
Allow combining Get-Random -Count with (implied) -Minimum / -Maximum to create multiple random values #8986
Currently, you can only obtain multiple values with -Count if you supply an input collection to select random elements from.
However, sometimes you want to generate multiple random values from a given range, such as "generate 3 random values in the range 0 to 1":
# WISHFUL THINKING - currently, you have to call Get-Random in a *loop*.
PS>Get-Random-Maximum 1.0-Count 30.009642093446870380.3997650627977050.589964029188251
Proposed technical implementation details
Allow combining parameter -Count with (implied) -Minimum and /or -Maximum as well, in which case -Count simply specifies how many values in the range to generate.
Activity
iSazonov commentedon Feb 26, 2019
What output type is expected? Int? Double?
vexx32 commentedon Feb 26, 2019
Whatever the input type for mininum/maximum is, is it not? I believe Get-Random dynamically determines that based upon input.