Created
October 11, 2017 09:50
-
-
Save sarangbk/ee35c25c4dd547908826a32d8ad7e54e to your computer and use it in GitHub Desktop.
Quick and dirty way to generate a random password as secure string for use in a PowerShell script
This file contains 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
$Password= -join ((33..63) + (65..90) + (97..122) | Get-Random -Count 12 | % {[char]$_}) | ConvertTo-SecureString -AsPlainText -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment