Get-random ignores a null or undefined variable in Powershell 3.0$a=$null (get-random -debug $a) | fl *1333117736 (get-random -debug -verbose $a) | fl *1221737207(get-random -debug -verbose $null) | fl *1050644159$a="random string"(get-random -debug -verbose $a) | fl *get-random : Cannot convert value "random string" to type "System.Int32". Error: "Input string was not in a correct format."At line:1 char:2+ (get-random -debug -verbose $a) | fl *+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Get-Random], PSInvalidCastException + FullyQualifiedErrorId : InvalidCastFromStringToInteger,Microsoft.PowerShell.Commands.GetRandomCommand(get-random -debug -verbose $true) | fl *0.872889721241263(get-random -debug -verbose $false) | fl *get-random : Minimum (0) cannot be greater than or equal to Maximum (0).At line:1 char:2+ (get-random -debug -verbose $false) | fl *+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Get-Random], ArgumentException + FullyQualifiedErrorId : MinGreaterThanOrEqualMax,Microsoft.PowerShell.Commands.GetRandomCommandSee my blog post here for how this effects the '-max' and '-min' parameters as well:http://horizontal-logic.blogspot.com/2012/12/a-defect-for-get-random.html
Have you seen this problem before in this product?