Generate a random string/password from the command line

The following commands generate a 24 character random string. Useful when you need a password string in a pinch. Linux or MacOS (terminal) openssl rand -hex 12 Windows (command line) powershell -command "-join ((48..57) + (65..90) + (97..122) | Get-Random -Count 24 | ForEach-Object {[char]$_})"