In a previous tip, we showed you how to create random passwords. Thanks to your feedback, here is an even shorter version:
-join ([Char[]]'abcdefgABCDEFG0123456&%$' | Get-Random -count 20)
ReTweet this Tip!
An enhancement to this to utilize printable characters, use: [CHAR[]]@(33..126) | Get-Random -Count 20)
Another enhancement to further randomize by randomize the length, use: [CHAR[]]@(33..126) | Get-Random -Count $(Get-Random -Minimum 7 -Maximum 15))