JustinGrote / JustinGrote/SecretManagement.KeePass

Keypass Database not being created on vault registration

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
123
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm having issues with creating keepass databased with the module:
I'm using the Create switch (set to $true) to create the keepass database according to:

https://github.com/JustinGrote/SecretManagement.KeePass/blob/main/SecretManagement.KeePass/Public/Register-KeePassSecretVault.ps1

When running the code, no exceptions are raised. No file is created as well.

**_Sample Code:_**
``` PowerShell
$KeePassDB = "C:\Temp\keepass.kdbx"

# set up the value for the VaultParameters parameter
$VParams = @{
Path = $KeePassDB
UseMasterPassword = $true
MasterPassword = 'pwd' | ConvertTo-SecureString -AsPlainText -Force
Create = $true
}

# Set a vault name and if it exists then unregister that vault in this session
$VaultName = 'KPVault01'
Register-SecretVault -Name $VaultName -ModuleName SecretManagement.keepass -VaultParameters $VParams -Verbose
```

Manually running `Register-KeepassSecretVault` raises the following exception:

``` PowerShell
Register-KeepassSecretVault @VParams
Resolve-Path : Cannot find path 'C:\Temp\keepass.kdbx' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\SecretManagement.keepass\0.9.2\SecretManagement.KeePass.psm1:50 char:17
+ $Path = Resolve-Path $Path
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Temp\keepass.kdbx:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.