A random password generator implementation in PowerShell.
New-Password -Length 20
A single 20 character long password.
10..20 | New-Password
A set of passwords with lengths from 10 to 20 characters.
@(20) * 20 | New-Password
20 passwords, 20 characters long.
New-Password -CharacterSet 'ABCDEF', '1234567890'
A random password generated from the specified set. The password will contain a miniumum of 1 of each character set.
New-Password -CharacterSetCount 0, 1, 2, 3
A password which contains a minimum of 0 from the first set, 1 from the second, 2 from the third, and 3 from the forth.
Thanks to faustonascimento on the PowerShell user group channel for helping rewrite this, making it far better than it was.