diff --git a/scripts/deploy-ftp.ps1 b/scripts/deploy-ftp.ps1 index 0104a80..09980f3 100644 --- a/scripts/deploy-ftp.ps1 +++ b/scripts/deploy-ftp.ps1 @@ -51,6 +51,9 @@ function Read-PlainOrPrompt([string]$Value, [string]$Prompt, [bool]$Secure = $fa if ($Value) { return $Value } if ($Secure) { $secure = Read-Host -Prompt $Prompt -AsSecureString + if (-not ($secure -is [System.Security.SecureString])) { + $secure = ConvertTo-SecureString -String ([string]$secure) -AsPlainText -Force + } $ptr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure) try { return [Runtime.InteropServices.Marshal]::PtrToStringUni($ptr) } finally {