PoShKeePass icon indicating copy to clipboard operation
PoShKeePass copied to clipboard

Update KeePassEntry

Open ciprianofernandes opened this issue 2 years ago • 1 comments

Hi,

I try to upadate entry and not accept the value for -KeePassPassword, and open a form to put a password:

KeePass

Code:

Import the PoShKeePass module

Import-Module PoShKeePass

Specify the path for the new KeePass database

$NewDatabasePath = "C:\Data\KeePass-2.55\Database\Database.kdbx"

Specify the master password for the new database

$MasterPassword = ConvertTo-SecureString "123456789" -AsPlainText -Force

$profile = "MyKeePassDatabase" $KeePassEntryGroupPath = "Database/Windows/Server" $Title = "Web10"

$keePassEntryToUpdate = Get-KeePassEntry -KeePassEntryGroupPath $KeePassEntryGroupPath -Title $Title -DatabaseProfileName $profile -MasterKey $MasterPassword

Update-KeePassEntry -KeePassEntry $keePassEntryToUpdate -DatabaseProfileName $profile -KeePassEntryGroupPath $KeePassEntryGroupPath -KeePassPassword $(New-KeePassPassword -upper -lower -digits -length 20)

Thank you

ciprianofernandes avatar Dec 06 '23 14:12 ciprianofernandes

You need to add the -MasterKey $MasterPassword parameter to your Update-KeePass entry (wow this is old oops, hopefully you figured it out by now... I was looking for help on something else and just happened to have an answer)

cpurules avatar Nov 20 '24 00:11 cpurules