Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KeePassEntry #211

Open
ciprianofernandes opened this issue Dec 6, 2023 · 1 comment
Open

Update KeePassEntry #211

ciprianofernandes opened this issue Dec 6, 2023 · 1 comment

Comments

@ciprianofernandes
Copy link

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

@cpurules
Copy link

cpurules commented Nov 20, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants