Generates strong passwords
PS1:
$length = 9 For ($a=48;$a –le 122;$a++) {$ascii+=,[char][byte]$a } Function GET-Temppassword() { Param( [int]$length=10, [string[]]$sourcedata ) For ($loop=1; $loop –le $length; $loop++) { $TempPassword+=($sourcedata | GET-RANDOM) } return $TempPassword } For ($a=48;$a –le 122;$a++) {$ascii+=,[char][byte]$a } GET-Temppassword –length $Length –sourcedata $ascii
Optional Function:
Function GET-Temppassword() { Param( [int]$length=10, [string[]]$sourcedata ) For ($loop=1; $loop –le $length; $loop++) { $TempPassword+=($sourcedata | GET-RANDOM) } return $TempPassword }
ZIP: