Reputation: 654
I have a Powershell app that retrieves some secret data- then needs to execute a .NET exe (locally) passing that data. It appears that passing the data as a raw param could expose it to users on the machine, so I'm looking for a way to keep it secure.
Possible solutions-
Any tips/guidance would be appreciated.
Upvotes: 0
Views: 543
Reputation: 9591
Working With Passwords and Secure Strings in Windows Powershell
Basic example of encrypting a string:
$PlainParam = "param you want to encrypt"
$SecureParam = $PlainParam | ConvertTo-SecureString -AsPlainText -Force
Cmdlets to look into:
ConvertTo-SecureString
ConvertFrom-SecureString
Upvotes: 1