Skip to content

Instantly share code, notes, and snippets.

@gravcat
Created October 3, 2017 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gravcat/e1c0bc3ebbfc9301a48968476a58f706 to your computer and use it in GitHub Desktop.
Save gravcat/e1c0bc3ebbfc9301a48968476a58f706 to your computer and use it in GitHub Desktop.
function New-RandomComplexPassword ($length=12)
{
$Assembly = Add-Type -AssemblyName System.Web
$password = [System.Web.Security.Membership]::GeneratePassword($length,2)
return $password
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment