I configured a secret vault for myself, and when I registered it, I was prompted to set a password. Now, I'm working on automating the registration process for my team, but when I run the registration command, it just creates the vault without asking for a password. It seems to automatically use whatever password was set when I first unlocked the vault.
When I try to change the password using Set-SecretStorePassword, it asks for an "old password" which I can't provide since there wasn't one set at creation. I've tried putting in random values and leaving it empty, but nothing works. Is anyone else experiencing this? I'm using Microsoft.PowerShell.SecretStore module version 1.0.6, and the system where it asks for a password is Server 2019, while the one that's not prompting is Server 2022. My PowerShell version is 7.5.3.
1 Answer
According to the documentation, when you use the -NewPassword flag during Set-SecretStorePassword on a vault without a password, you shouldn't need to provide an old password. Have you tried just using -NewPassword by itself? That might solve your issue!

I tried that, but when I registered my vault with the command, it ran into this error: "A valid password is required to access the Microsoft.PowerShell.SecretStore vault." It seems like there's already a password set at creation.