PowerShell Secrets Management – Part 2: Installation and first steps.

My recent article about the architecture of PowerShell Secret Management explained how the modules work together. This blog is a step by step guide on installation and usage of PowerShell Secrets Management.

Lets immediately start with installation.

1.) Installing the Modules

Secretsmanagement modules are hosted on the Powershell Gallery. As of today Feb. 23 2021, they are still a prerelease so the installation command is:

2.) CmdLets provided by the modules

Now lets figure out what CmdLets we got with the newly installed modules

SecretStore has 5 CmdLets (What you should know – every furture „Store“ Module will have 5 CmdLets with similar functionality)

SecretManagement CmdLets are received by:

And the result is:

3.) Create a SecretStore Configuration

If you have a completely new configuration, simply start with:

Now you have a configuration (aka a policy) how vaults are accessed.

4.) Create a vault

If we want to store secrets, you need to create vaults to store them somewhere. We just created a Store-Configuration. now lets create a vault.

Lets see what we created:

Results of our vault-listing:

5.) Create secrets

Finally, we can store secrets.

Interestingly the second command requires the secret password of the vault. Not sure why this is the case, probably password timeout.

Now lets see what secrets we have stored:

This shows our currently stored secrets:

6.) Read Secrets

Now finally comes the step, why we do the whole procedure, read secrets from the vault.

Great – we can read a secret now. A future blog will probably deal with secrets in scripts any maybe other provider.

Have fun testing/experimenting.

Regards/Roman

Thanks for the picture: Photo by Georg Bommeli on Unsplash