Skip to content

Commit bb2de1a

Browse files
fadikshojasontaylordev
authored andcommitted
Fix randomization bug in GenerateRandomPassword function.
1 parent bc4677a commit bb2de1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.scripts/setup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function GenerateRandomPassword {
170170
[int]$Length = 16
171171
)
172172

173-
$ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#^_-+=?<>|~"
173+
$ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#^_-+=?<>|~".ToCharArray()
174174
$Password = -join ((Get-Random -Count $Length -InputObject $ValidChars) | Get-Random -Count $Length)
175175

176176
return $Password

0 commit comments

Comments
 (0)