Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need help creating an encrypted string

Posted on 2013-06-02
3
Medium Priority
?
409 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
clockwatcher earned 2000 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

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

721 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