Migrate from PSUSecretStore to Database

Is it possible to automate process of migration of variables from PSUSecretStore to Database storage?

Product: PowerShell Universal
Version: 3.7.11

We currently don’t provide this directly but you should be able to do it in a PSU script. Use $Secret:xyz to read your secrets and then use New-PSUVariable with the -Vault parameter set to Database to create them in the database.

I was considering this option as well. Thanks for tip.
Is it possible to enumerate all existing secret variables? I have few hundreds of them…

You can use Get-PSUVariable to get the list. It won’t contain the actual secret when using it that way.

You can also use Get-SecretInfo or Get-Secret to return them directly from the Secretmanagement module.