Summary of the new feature/enhancement
Get-Random currently requires you to specify a -Count argument in order to extract a random subset from an input collection.
Sometimes you want to shuffle an input collection, i.e. to return all input objects, in randomized order, and it would be nice to be able to express that intent directly, without having to provide a -Count (which may not even be known; you can work around that with -Count ([int]::MaxValue), but that is awkward).
To that end, a new -Shuffle parameter could be introduced:
# WISHFUL THINKING - sample output.
PS> 1..5 | Get-Random -Shuffle
4
2
5
3
1
Summary of the new feature/enhancement
Get-Randomcurrently requires you to specify a-Countargument in order to extract a random subset from an input collection.Sometimes you want to shuffle an input collection, i.e. to return all input objects, in randomized order, and it would be nice to be able to express that intent directly, without having to provide a
-Count(which may not even be known; you can work around that with-Count ([int]::MaxValue), but that is awkward).To that end, a new
-Shuffleparameter could be introduced: