PSKeePass/PoShKeePass

How to change DatabasePath in an existing DatabaseConfiguration

Remi-PAULEAU opened this issue · 2 comments

Hi,

I want to change DatabasePath. I suppose I must use "Update-KeePassDatabaseConfiguration" but I don't understand How.

Update-KeePassDatabaseConfiguration -DatabaseProfileName "MyDatabaseProfileName.kdbx" -DatabasePath "X:\My\NewShare\MyDatabaseProfileName.kdbx.kdbx"

Error :
"Update-KeePassDatabaseConfiguration: The parameter set can not be resolved using the specified named parameters."

Regards,

jkdba commented

Hi, Thanks for reaching out, I tested as well and it appears to be broken.

While I fix this here are some workarounds:

1. Edit the xml configuration file directly:

This global variable has the path to the configuration file

$Global:KeePassConfigurationFile

Edit this file, find the old path and replace with the new, save and done.

2. Remove the profile and recreate it with the new path.

Remove-KeePassDatabaseConfiguration -DatabaseProfileName "MyDatabaseProfileName.kdbx"
New-KeePassDatabaseConfiguration -DatabaseProfileName "MyDatabaseProfileName.kdbx" <your other parameters>

Thanks !

I'll change the path in my xml configuration here :
"C:\Program Files\WindowsPowerShell\Modules\PoShKeePass\2.1.3.0\KeePassConfiguration.xml"

Thanks again =D