Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Get-StrongPassword -NumberOfSpecialCharacters #25

Open
BlackV opened this issue Aug 23, 2019 · 2 comments
Open

Get-StrongPassword -NumberOfSpecialCharacters #25

BlackV opened this issue Aug 23, 2019 · 2 comments

Comments

@BlackV
Copy link

BlackV commented Aug 23, 2019

Get-StrongPassword -NumberOfSpecialCharacters

Says default value is 3
If i use any value less than 5 (0,1,2,3,4) it seems to return 5 (or more) special characters

0..4 | foreach-object {[pscustomobject]@{'NumSpecial' = $_; 'Password' = Get-StrongPassword -Length 20 -NumberOfSpecialCharacters $_}}

NumSpecial Password
0 JN}ts#!^FycNj[9E]5;&
1 5sIV76]2!oZ>prk9d(P
2 23n8U.}_{kZGzj-ClUbE
3 ]hUPY-QS^Q2cVi
Gk!jf
4 4E>O[FrM]d}@A5qKFv4H

so what is considered a special character
0 has 8, 1 has 5, 2 has 5, 3 has 5, 4 has 5

@xxbiohazrdxx
Copy link

Just FYI, this is a .NET bug. The cmdlet calls System.Web.Security.Membership.GeneratePassword(int length, int numberOfNonAlphanumericCharacters) which doesn't work properly.

@BlackV
Copy link
Author

BlackV commented Feb 13, 2020

Just FYI, this is a .NET bug. The cmdlet calls System.Web.Security.Membership.GeneratePassword(int length, int numberOfNonAlphanumericCharacters) which doesn't work properly.

good to know

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants