This is how you can generate a Secure String with powershell and use it in your scripts
secureString = Read-Host -AsSecureString ConvertFrom-SecureString $secureString | out-file c:\temp\encrypted.txt $newString = gc C:\temp\encrypted.txt | ConvertTo-SecureString
Load the Secure string from file and use it in your script:
$securePassword = Get-Content c:\temp\encrypted.txt | ConvertTo-SecureString