3 Responses

  1. Dave Cramp
    Dave Cramp at |

    Hey Chris,

    Great write-up!

    Something that came up in your PowerShell talk at VMUG in Sydney, Australia was the inability to share that stored key. While it’s a great security feature I have had to store a password converted to secure string in a text file so a scheduled task could connect to remote resources with the correct credentials.

    The exported secure string was created by the remote party so I never had to know the actual plain-text password. So to be able to share stored credentials that have been converted to secure string and exported you can use the following to export the password:

    # Create a randomized hey array
    $key = (2, 8, 12, 3, 77, 95, 205, 222, 1, 51, 82, 94, 9, 9, 30, 133, 18, 64, 223, 47, 66, 75, 35, 23)

    # Specify this key when converting to secure string
    ConvertTo-SecureString -AsPlainText -Key $key -Force “password”

    You can then share the exported secure string password along with the value of $key for others to use. Helpful if you’re building the test credentials or the test configuration for someone else or another system to run.

    Cheers,
    Dave!

    Reply
  2. Encrypting Environmental Variables with AppVeyor - Wahl Network

    […] a previous post, I outlined the use of environmental variables with AppVeyor to pass along sensitive information. It appears there’s an alternative method that negates […]

Share your point of view!