Solved

Need help creating an encrypted string

Posted on 2013-06-02
3
405 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 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
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ā€¦
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 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