Publish preview version #42

Merged
OCram85 merged 25 commits from dev into master 2019-04-04 17:02:18 +02:00
2 changed files with 2 additions and 6 deletions
Showing only changes of commit 6789441758 - Show all commits

View File

@ -89,9 +89,7 @@ function Get-CredentialStoreItem {
if (($CSMembers.MemberType -eq "NoteProperty") -and ($CSMembers.Name -contains $CredentialName)) { if (($CSMembers.MemberType -eq "NoteProperty") -and ($CSMembers.Name -contains $CredentialName)) {
try { try {
if ($null -eq $CS.PfxCertificate) { if ($null -eq $CS.PfxCertificate) {
$Cert = Get-ChildItem -Recurse -Path 'Cert:' | Where-Object { $Cert = Get-CSCertificate -Thumbprint $CS.Thumbprint
$_.Thumbprint -eq $CS.Thumbprint
} | Select-Object -First 1
} }
else { else {
$Cert = Get-PfxCertificate -FilePath $CS.PfxCertificate -ErrorAction Stop $Cert = Get-PfxCertificate -FilePath $CS.PfxCertificate -ErrorAction Stop

View File

@ -104,9 +104,7 @@ function Set-CredentialStoreItem {
if ($Credential.UserName) { if ($Credential.UserName) {
try { try {
if ($null -eq $CSContent.PfxCertificate) { if ($null -eq $CSContent.PfxCertificate) {
$Cert = Get-ChildItem -Recurse -Path 'Cert:' | Where-Object { $Cert = Get-CSCertificate -Thumbprint $CSContent.Thumbprint
$_.Thumbprint -eq $CSContent.Thumbprint
} | Select-Object -First 1
} }
else { else {
$Cert = Get-PfxCertificate -FilePath $CSContent.PfxCertificate -ErrorAction Stop $Cert = Get-PfxCertificate -FilePath $CSContent.PfxCertificate -ErrorAction Stop