DEV Community

Discussion on: How do you do random?

Collapse
4lch4 profile image
Devin W. Leaman

I originally found it on the Hey, Scripting Guy! blog, but it's pretty simple to use:

Get-Random -Count 2 -InputObject (1..10)

Where Count is how many random numbers you wish to generate, and InputObject is an array of the range of numbers you want to choose from.