param ( [Parameter(Mandatory=$true)][string]$Password = $( Read-Host "Input password, please" ) ) $Key = Get-Content ".\key" $Password | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString -Key $key | out-file ".\pwd"