How do I encrypt the contents of a config file to use on multiple machines

I have a script that sends a report daily from multiple machines via gmail.  The script needs to input the username and password when emailing the report.  I do not want to store the credentials in plain text and have found a way of storing them as a secure string, not perfect but at least it is not in plain text.  

From reading it looks like I cannot deploy a single config file on multiple machine, different Worgroups/Domains etc. because the encryption uses local security keys and is tied to the userid that created the secure string.

The question:
I am looking for a simple process to create a config file that can be reused across multiple environments and keep the UserID and password encrypted.

I know this is not completely secure but am willing to deal with possible fallout.
Who is Participating?
Andrej PirmanConnect With a Mentor Commented:
Well, I do not have an option to test, but here are few examples.
This is for using Active Directory to store and retrieve password as an encrypted hash:

And a similar one with examples, how to store password to a file and read it, all secured with hash.

It will work all across windows domain.
Use truecrypt.  Truecrypt Website
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.