Automation · PowerShell Automation
SecretManagement
Cheat sheet · https://pcornel.dk/topic.php?topic=5249
Answer
SecretManagement is a PowerShell module that gives one interface (Get-Secret, Set-Secret) to vaults such as SecretStore, Azure Key Vault or KeePass, keeping secrets out of scripts.
Remember
- Get-Secret/Set-Secret.
- Pluggable vaults.
- Keeps secrets out of scripts.
First checks
Get-SecretVault— registered vaultsGet-Secret -Name <n> -AsPlainText (only when required)— retrieveRegister-SecretVault -Name KV -ModuleName Az.KeyVault— add vault
Verify in this order
script → SecretManagement → vault extension → secret
Where it usually breaks
Script/input → command/module binding → local/remoting session → request accepted → command result → target object read-back → effective runtime state → workload.
SecretManagement · PowerShell operational reference
| Boundary | SecretManagement reference |
|---|---|
| Runtime identity | PowerShell edition/version + command/module source |
| Persistent intent | Script/module/config prerequisites under source control |
| Verification | Read-only discovery → execution evidence → independent target read-back |
| Output contract | Structured objects/streams before formatting |
| Failure boundary | Separate engine/binding from transport/API/native and target-state failures |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5249