Similar to C# – Random Password Generator but this will work with PowerShell scripts. This script has a minimum of four (4) characters but you can change that to whatever you would like. Reference: http://www.wisesoft.co.uk/scripts/powershell_random_password_generator.aspx Another approach Reference: http://poshcode.org/5806