PoshTip #28 – Generate Random Passwords
First, import the System.Web assembly:
Add-Type -AssemblyName System.Web
and use the GeneratePassword function:
[System.Web.Security.Membership]::GeneratePassword(10,5)
GeneratePassword(x,y)
x=Password length
y=Number of alphanumeric characters
Thanks for reading! You can follow me on Twitter @PrigentNico