From b787342b694108a1f2d85aa346474ef173e2f407 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Thu, 4 Apr 2019 15:51:08 +0200 Subject: [PATCH] fix cs cert import --- src/Store/New-CredentialStore.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Store/New-CredentialStore.ps1 b/src/Store/New-CredentialStore.ps1 index f166181..b172e28 100644 --- a/src/Store/New-CredentialStore.ps1 +++ b/src/Store/New-CredentialStore.ps1 @@ -159,6 +159,7 @@ function New-CredentialStore { Confirm = $false } + # test if there is already a cert if ((Test-Path $PfxParams.CertName) -and (! $Force.IsPresent)) { $ErrorParams = @{ Exception = [System.IO.InvalidDataException]::new( @@ -208,8 +209,8 @@ function New-CredentialStore { $ObjProperties.PfxCertificate = $PfxParams.CertName } else { - Write-Verbose 'Importing new PFX certifiate file' - Import-CSCertificate -Path $PfxParams.CertName + Write-Verbose 'Importing new PFX certificate file...' + Import-CSCertificate -Path $PfxParams.CertName -StoreName My -StoreLocation CurrentUser } }