I’ve been playing around with the Powershell Secret Management module, hoping I could fix the issue of having passwords in certain scripts I’m running on a schedule. However, it seems that I’m not able to solve this issue with the secret management module. but I’m hoping I’m wrong and someone has a solution for me
So the situation is as followed. I’ve got Powershell scripts running on a schedule. These scripts perform actions and some of these actions require a login. For instance, a username and password for an SMTP server. I was hoping to store thee credentials in a secret vault and then retrieve the secret from the vault from the Powershell script.
However: in order to retrieve the secret from the vault, I need to supply a password…
Yes, i still need to code a password in my script. While the whole idea is to have no passwords in my script.
So, is this the wrong solution for my issue? Or can I access the vault in another manner which is still secure but does not require me to code the secret to the store in my script?
Any suggestions for other solutions are also very welcome
I might be wrong about that but as I understood it it’s not made for this purpose. So you will not be able to use it for this purpose properly.
The easiest way in my opinion is to use the account actually needed to access the target resource for the scheduled task to run. So you don’t even need to have credentials in the script.
If you want to use external resources outside your active directory domain you should try to store the credentials in a secure way. I don’t have personal experiences with it because I’ve never needed something like this so far.
I googled a few links for you … maybe they’ll help
Thank you very much for your reply. I had seen the solution to save the encrypted password in a text file before, but thought it wasn’t very neat. But, seeing all these posts now, it looks like this is a best practice within the community.
and who knows, maybe in the future there will be an addition to the secret management module to store these encrypted passwords without the need to authenticate with a password to retrieve them
thank you for the suggestion. It does looks promising, I’ve tested it out and it does work. It does raises the question: by setting the configuration to Authentication None, doesn’t this introduce the risk that someone else on the server is able to access my vault?