Fix the error message to be a bit more specific, as to why the CredentialStoreItem could not be added.

This commit is contained in:
pinguinfuss 2022-09-20 08:35:44 +02:00
parent ddb85d907f
commit 055db88324
1 changed files with 168 additions and 168 deletions

View File

@ -84,7 +84,7 @@ function New-CredentialStoreItem {
if (-not(Test-CredentialStore -Shared -Path $Path)) {
$MessageParams = @{
Exception = [System.IO.FileNotFoundException]::new(
'Could not add anything into the given CredentialStore.'
'The given credential store ({0}) does not exist!' -f $Path
)
ErrorAction = "Stop"
}