Skip to content

Instantly share code, notes, and snippets.

@justusiv
Created March 28, 2020 16:22
Show Gist options
  • Save justusiv/ff8d96a2caf1a4f76fc81d2c74211b36 to your computer and use it in GitHub Desktop.
Save justusiv/ff8d96a2caf1a4f76fc81d2c74211b36 to your computer and use it in GitHub Desktop.
RandomNumbersAndColors
while($true){
$length = get-random -Minimum 1 -Maximum 15
$min = [Math]::Pow(10,$length) / 10
$max = [Math]::Pow(10,$length) - 1
$ran = [math]::Round((Get-Random -Minimum $min -Maximum $max))
write-host $ran -NoNewline -BackgroundColor (Get-Random -Minimum 0 -Maximum 16) -ForegroundColor (Get-Random -Minimum 0 -Maximum 16)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment