It’s a fairly common requirement when creating a new user to assign a randomly generated password, so during a recent engagement I wrote a little password generator to do that. I wanted to be able to chose whether special characters were used, and the length of the password - typically if the password doesn’t used special characters I would increase the length significantly!
Characters should be randomly picked from:
a-z A-Z 0-9 (optional) ASCII special characters Inputs passwordLength - the length of the password to be generated (number) excludePunctuation - exclude the use of special characters if TRUE (boolean) Outputs generatedPassword - the generated password (SecureString) The SecureString type prevents the string from being displayed in the workflow attributes - it can be used as a normal string, but will be asterisk’d when displayed.