Browse Source

Update install.ps1

FusionPBX 7 years ago
parent
commit
6db1fdab20
1 changed files with 4 additions and 1 deletions
  1. 4 1
      windows/install.ps1

+ 4 - 1
windows/install.ps1

@@ -49,7 +49,10 @@ Function Write-Log([string]$message) {
 }
 
 Function New-Password([int32]$length) {
-	([char[]]([char]'A'..[char]'Z') + [char[]]([char]'a'..[char]'z') + 0..9 | Sort-Object {Get-Random})[0..$length] -join ''
+	$password = ""
+	$chars = "abcdefghijkmnopqrstuvwxyzABCEFGHJKLMNPQRSTUVWXYZ23456789!#%&?".ToCharArray()
+	1..$length | ForEach {  $password += $chars | Get-Random }
+	return $password
 }
 
 Function Get-InstalledApp([string]$name) {