Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Created June 9, 2017 17:37
Show Gist options
  • Save JohnL4/879024feabdcd44f35012ce70867d680 to your computer and use it in GitHub Desktop.
Save JohnL4/879024feabdcd44f35012ce70867d680 to your computer and use it in GitHub Desktop.
PowerShell snippet to quickly gin up a new random number.
(new-object Random).Next()
# Or...
$n = 9999999999
[Math]::Floor((new-object Random).NextDouble() * $n) + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment