Forum Discussion
Baron164
Mar 22, 2023Brass Contributor
How can I protect a password within this login script?
 I have a powershell script that logs into a SQL server and writes data to a table whenever a user logs in. I want to protect the password and not just have it in cleartext within the script. What wou...
AndySvints
Mar 22, 2023Iron Contributor
Hello Baron164,
You can look into Microsoft.PowerShell.SecretManagement ( provides a convenient way for a user to store and retrieve secrets), which supports multiple secret vault types. For starters, you can use Microsoft.PowerShell.SecretStore ( Local secure store extension vault).
Hope that helps.