From b760b65f633ee53764b8186efe88709684878392 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 5 Apr 2019 12:51:45 +0200 Subject: [PATCH] fix cert store location for windows shared mode --- src/Certificate/Import-CSCertificate.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Certificate/Import-CSCertificate.ps1 b/src/Certificate/Import-CSCertificate.ps1 index 9d0fcb0..af302d7 100644 --- a/src/Certificate/Import-CSCertificate.ps1 +++ b/src/Certificate/Import-CSCertificate.ps1 @@ -57,10 +57,10 @@ function Import-CSCertificate { Import-CSPfxCertificate -Path $Path -StoreName 'My' -StoreLocation 'CurrentUser' -OpenFlags 'ReadWrite' } elseif ( (! $isLinux ) -and ($Type -eq 'Shared') ) { - Import-CSPfxCertificate -Path $Path -StoreName 'My' -StoreLocation 'CurrentUser' -OpenFlags 'ReadWrite' + Import-CSPfxCertificate -Path $Path -StoreName 'My' -StoreLocation 'LocalMachine' -OpenFlags 'ReadWrite' } elseif ( ($isLinux) -and ($Type -eq 'Shared') ) { - Import-CSPfxCertificate -Path $Path -StoreName 'My' -StoreLocation 'LocalMachine' -OpenFlags 'ReadWrite' + Import-CSPfxCertificate -Path $Path -StoreName 'My' -StoreLocation 'CurrentUser' -OpenFlags 'ReadWrite' } } end {