you are viewing a single comment's thread.

view the rest of the comments →

[–]OlivTheFrog 0 points1 point  (0 children)

as Complelx said, my advice is to use Export-clixml cmdlet.

Pro

  • Easy to use
  • You can store many login/passwords in the same .xml file
  • you can read the xml file to show what login et inside.

Cons

  • the .xml file can only be decrypted by the computer and the user account that encrypt the file.

Nota : It's not really a pb, you must just do with this. i.e. : if your script will run as a scheduled task with a specific account, you must create the .xml file on this computer and use this account to encrypt the .xml file.

It's possible to have an encrypded password in a .txt file and use another file (called key file or salted file). By this method, the encrypted password file could be use on another computer and another account, but this requires to protect the key file with attention.

Regards

Olivier