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
-Shuffle:$false not respected in Get-SecureRandom #26458
-Shuffle:$false behaves the same as -Shuffle or -Shuffle:$true, returning all items in shuffled order.
Error details
No error is thrown. The cmdlet executes but ignores the explicit $false value.
Environment data
PS>$PSVersionTable
Name Value
---------
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This issue will be fixed by PR #26457, which corrects the handling of explicit -Shuffle:$false in the base class GetRandomCommandBase that Get-SecureRandom inherits from.
However, there are currently no tests for Get-SecureRandom -Shuffle:$false, so I will create a PR to add the missing test coverage.
Activity
yotsuda commentedon Nov 16, 2025
This issue will be fixed by PR #26457, which corrects the handling of explicit
-Shuffle:$falsein the base classGetRandomCommandBasethatGet-SecureRandominherits from.However, there are currently no tests for
Get-SecureRandom -Shuffle:$false, so I will create a PR to add the missing test coverage.