Skip to content

Errors with databases linked to Windows Accounts #79

@fullenw1

Description

@fullenw1

When I register a database with a Windows Account in addition to the Master password I get this output:

PS> Register-KeepassSecretVault -Path 'C:\MyPath\MyKeepass.kdbx' -Name MyKeepass -UseWindowsAccount -UseMasterPassword
WARNING: [13:52:29][Test-SecretVault] Exception calling ".ctor" with "0" argument(s): "Operation is not supported on this platform."
WARNING: [13:52:29][Test-SecretVault] Unable to open connection to the database
Register-KeepassSecretVault : A parameter cannot be found that matches parameter name 'Name'.
At line:1 char:1
+ Register-KeepassSecretVault -Path 'C:\MyPath\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Register-KeepassSecretVault], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Register-KeepassSecretVault

If I do the same with a database which does not need a Windows Account authentication, I get no error.

Furthermore, despite the error message the database seems to be registered anyway.
It appears in the list returned by Get-SecretVault.

PS> Get-SecretVault

Name          ModuleName                       IsDefaultVault
----          ----------                       --------------
LocalComputer Microsoft.PowerShell.SecretStore True
MyKeepass     SecretManagement.KeePass         False

However, when I try to unlock the vault, I get this error:

PS> Unlock-SecretVault -Name MyKeepass

cmdlet Unlock-SecretVault at command pipeline position 1
Supply values for the following parameters:
Password: ***********************
WARNING: [14:10:02][Test-SecretVault] Exception calling ".ctor" with "0" argument(s): "Operation is not supported on this platform."
WARNING: [14:10:02][Test-SecretVault] Unable to open connection to the database
WARNING: [14:10:02][Unlock-SecretVault] MyKeepass: Failed to unlock the vault
PS> (Get-CimInstance -ClassName Win32_OperatingSystem).Caption
Microsoft Windows 10 Entreprise

PS> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  2364

PS> $PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      3      3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions