Don’t save passwords as plain text. Instead save them as a secure string and encrypt them locally.
Input sensitive data into the console
Don’t convert plain text into secure string
- as the commands get logged.
Read and write files
Encrypt an existing file
Decrypt an existing file
Decrypt data locally
Only the same PowerShell instance can decrypt.
Decrypt a secure string
Decrypt a secure string or credential
Sources:
Related:
Tags:
File System - Use paths, get meta data, link, download, and encrypt files and folders
PowerShell Objects - Handle, Import, Export, Filter and RegEx query objects