Created
November 27, 2020 17:16
-
-
Save directionforward/c7773be85695f3043ba2e390fd163b01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Generate365PW | |
{ | |
Param($max = 1) | |
For ($i = 0; $i -lt $max; $i++){ | |
$pw = Get-Random -Count 1 -InputObject ((65..72)+(74..75)+(77..78)+(80..90)) | % -begin {$UC=$null} -process {$UC += [char]$_} -end {$UC} | |
$pw += Get-Random -Count 5 -InputObject (97..122) | % -begin {$LC=$null} -process {$LC += [char]$_} -end {$LC} | |
$pw += Get-Random -Count 2 -InputObject (48..57) | % -begin {$NB=$null} -process {$NB += [char]$_} -end {$NB} | |
write-output $pw | |
} | |
} | |
Generate365PW |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment