Solved

Need help creating an encrypted string

Posted on 2013-06-02
3
391 Views
Last Modified: 2013-06-03
I created a script to get fields using read-host, there are 5 fields, all of the fields are to be encrypted and saved to a config file.  2 of the five are not saved as encrypted strings, the from and To address, all other fields are encrypted.  I've included a copy of the Config file.

I'm sure its something simple but I don't see what I am doing wrong, need some help

Thanks
from.txt
sendfile.txt
0
Comment
Question by:c7c4c7
3 Comments
 
LVL 25

Accepted Solution

by:
clockwatcher earned 500 total points
ID: 39215402
You're missing the $ in front of your variable names in those two cases.  Change this:

out-file -filepath C:\bat\sendfile.config -inputobject encrypted_fromAddress_string -append
out-file -filepath C:\bat\sendfile.config -inputobject encrypted_toAddress_string -append

Open in new window


to
out-file -filepath C:\bat\sendfile.config -inputobject $encrypted_fromAddress_string -append
out-file -filepath C:\bat\sendfile.config -inputobject $encrypted_toAddress_string -append

Open in new window

0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39215403
in from.txt:
you forgot the $ sign for encrypted_fromAddress_string and encrypted_toAddress_string when u use out-file.
0
 

Author Closing Comment

by:c7c4c7
ID: 39216678
Thanks, I new it would be simple I just couldn't see it
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question