$Test = Read-Host -AsSecureString
$Test | ConvertFrom-SecureString | Out-File "c:\test.txt"

This will give you the encrypted password. To use that password, you just
need to store it to a variable and use COnvertTo-SecureString



On Tue, Jul 22, 2014 at 9:55 AM, Daniel Ratliff <dratl...@humana.com> wrote:

>  I feel like I am missing something glaringly obvious here.
>
>
>
> I have two requirements:
>
> 1.       Store the password in the script, but not in plain text
>
> 2.       Use a single script with nothing external
>
>
>
> Is there no way with PowerShell to store an encrypted password in a script
> and re-use that on multiple machines?
>
>
>
> *Daniel Ratliff*
>
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed
> and may contain CONFIDENTIAL material. If you receive this
> material/information in error,
> please contact the sender and delete or destroy the material/information.
>
>


Reply via email to