Created
October 4, 2019 05:28
-
-
Save loctanvo/a0967e67aab50f6d67c6603b8279278e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-GeneratedPwd { | |
$bytes = New-Object "System.Byte[]" 32 | |
$rnd = New-Object System.Security.Cryptography.RNGCryptoServiceProvider | |
$rnd.GetBytes($bytes) | |
[Convert]::ToBase64String($bytes) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment