This script will give you a super random password with the length given in the $long parameter.

 

This script required PowerShell 5 or higher to work.

 

The Parameters?

Long: Mandatory Parameter, gives the size of the password.

Int: Optional parameter, default parameter is 10.

 

The Logic:

.\Get-RandomPwd -Long 30    Will provide a password with 30 of longitude, composite by three passwords of 30 characters. From the 1st password, it will get the ten 1st characters (remember int =10). From the 2nd passwords it will get the characters in place 11 to 20 (again int 10), and from the 3rd password, it will take the last ten characters to get the new password.

 

 

Example:

 

PowerShell
Edit|Remove
 .\Get-RandomPwd -Long 30 -int 5
 

 

It will provide a password with 30 of longitude, composite by (Long/int) passwords.   Int by default has a value of 5. so (Long/int) = 6 (6 different passwords).

 

 

PowerShell
Edit|Remove
Get-help .\Get-RandomPwd -full