Create-RandomPassword

Create a (really) random password

 

Function Create-RandomPassword {
$Length = "10" #number of characters
$NonAlpha = "2" #Number of non alphanumerical characters
[Reflection.Assembly]::LoadWithPartialName(“System.Web”) | Out-Null
[System.Web.Security.Membership]::GeneratePassword($Length,$NonAlpha)
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top