• Beitrags-Kategorie:Allgemein / PowerShell
  • Lesedauer:2 min Lesezeit

This PowerShell snippets can generate secure, strong, random passwords. Password strength is a measure of how effective a password is against being guessed or against brute-force attacks. Although it varies, usually, password strength is an estimate of how many trials would be required on average for someone to successfully guess the password. This is affected by the length, complexity, and unpredictability of the password. For example, if a password involves a person’s name, birthday, or other personal information that typically would not be very difficult to find out, the password would likely make for a weak password.

Password created as on the IPhone

$([regex]::split($(([char[]](65..90)+[char[]](97..122)+0..9|sort{random})[0..17]-join''),'(.{6})')|?{$_})-join'-'

Example: ZD54p6-Wol0xw-NGnLFe

Password with certain special characters

([char[]](65..90)+[char[]](97..122)+"!§%?#".tochararray()+0..9|sort{random})[0..20]-join ''

Example: IPT?vyORGt3XxurfeKDmz

.NET Class

([System.Web.Security.Membership]::GeneratePassword(20,2))

Example: =z7(piqGpx@–1jZN4Z9

shortest one-liner

([char[]](33..126)|sort{random})[0..20]-join''

Example: X-]UckT%b7SN&PLzlnrO)

5 / 5. 22

Dieser Beitrag hat einen Kommentar

  1. NetPacket

    Neet, thanks

Schreibe einen Kommentar