Powershell: Generating random password for Active Directory

UPDATE 2015-01-04: I’ve updated the script on Technet Gallery: Drastically improved performance and randomization logic. When provisioning new users to Active Directory we need to provide a new password and of course we want to generate a random password. This is my thoughts and three methods for generating passwords, the first two quite simple and straightforward and the third method a little bit more complex and definitely the one I recommend.