PSKeePass / PoShKeePass

PowerShell module for KeePass
MIT License
255 stars 56 forks source link

Change password is not possible due to KeePassEntry #180

Open kzvbgit opened 4 years ago

kzvbgit commented 4 years ago

As I run the following it returns that "-KeePassEntry is NULL or EMPTY" : Update-KeePassEntry -KeePassEntry $KeePassEntryObject -DatabaseProfileName Datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -Title 'eins' -KeePassPassword $(New-KeePassPassword -UpperCase -LowerCase -Length 12)

After a change to an Entry with the title "eins" (on KeePass to see) it returns the parameter "KeePassUuid cannot be checked. The Argument is NULL or EMPTY. Also it returns "The Specified KeePass Entry does not exist or cannot be found". Code as follows: Update-KeePassEntry -KeePassEntry eins -DatabaseProfileName Datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -Title 'eins' -KeePassPassword $(New-KeePassPassword -UpperCase -LowerCase -Digits -SpecialCharacters -Length 16)

If there is no variable -Title it cannot verify and sais the same "The Argument is NULL or EMPTY".


Fix it with 4 different types of statements as follows but still get error messages even if KeePass is possible to synchronize the updates:

Get-KeePassEntry -DatabaseProfileName datenbank -KeePassEntryGroupPath Datenbank/Allgemein/Unterordner -title eins | Update-KeePassEntry -KeePassPassword $(New-KeePassPassword -LowerCase -UpperCase -Digits -Length 12)

Get-KeePassEntry -DatabaseProfileName datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -Title eins | Update-KeePassEntry -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -KeePassPassword $(New-KeePassPassword -LowerCase -UpperCase -Digits -Length 12)

Update-KeePassEntry -DatabaseProfileName Datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -KeePassEntry $(Get-KeePassEntry -DatabaseProfileName Datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -Title eins) -KeePassPassword $(New-KeePassPassword -UpperCase -LowerCase -Digits -Length 12)

Update-KeePassEntry -DatabaseProfileName Datenbank -KeePassEntry $(Get-KeePassEntry -DatabaseProfileName Datenbank -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test'-Title drei ) -KeePassEntryGroupPath 'Datenbank/Allgemein/Unterordner/Test test' -KeePassPassword $(New-KeePassPassword -UpperCase -LowerCase -Digits -SpecialCharacters -Length 16)

But still there is no function to update a whole column of entries at once with different password set.