This is a Two liner password generator using PowerShell.

The number 13, represent the password length, and the 5 represent the non Alpha, so it loads the System.Web library and use the GeneratePassword method to create the password.

$PasswordLength=13 #Password Length
 $NonAlphaChar=5 #The number of non Alphabetical Characters
 Add-Type -AssemblyName 'System.Web'
 [System.Web.Security.Membership]::GeneratePassword($PasswordLength,$NonAlphaChar)
Rate this post