Secrets Out of Scripts

A password or token written into a script travels wherever the script goes, so a script names the secret it needs and reads it from an environment variable, asks for it with Get-Credential, or fetches it from a SecretManagement vault, and stops with a clear message when it isn't there.

Updated

Cheat sheet for the lesson Secrets Out of Scripts: A password or token written into a script travels wherever the script goes, so a script names the secret it needs and reads it from an environment variable, asks for it with Get-Credential, or fetches it from a SecretManagement vault, and stops…
Category
PowerShell
Level
Journeyman
Tags
environment-variable, get-credential, powershell, pscredential, secret, secretmanagement, securestring