Publish preview version #42
@ -89,9 +89,7 @@ function Get-CredentialStoreItem {
|
||||
if (($CSMembers.MemberType -eq "NoteProperty") -and ($CSMembers.Name -contains $CredentialName)) {
|
||||
try {
|
||||
if ($null -eq $CS.PfxCertificate) {
|
||||
$Cert = Get-ChildItem -Recurse -Path 'Cert:' | Where-Object {
|
||||
$_.Thumbprint -eq $CS.Thumbprint
|
||||
} | Select-Object -First 1
|
||||
$Cert = Get-CSCertificate -Thumbprint $CS.Thumbprint
|
||||
}
|
||||
else {
|
||||
$Cert = Get-PfxCertificate -FilePath $CS.PfxCertificate -ErrorAction Stop
|
||||
|
@ -104,9 +104,7 @@ function Set-CredentialStoreItem {
|
||||
if ($Credential.UserName) {
|
||||
try {
|
||||
if ($null -eq $CSContent.PfxCertificate) {
|
||||
$Cert = Get-ChildItem -Recurse -Path 'Cert:' | Where-Object {
|
||||
$_.Thumbprint -eq $CSContent.Thumbprint
|
||||
} | Select-Object -First 1
|
||||
$Cert = Get-CSCertificate -Thumbprint $CSContent.Thumbprint
|
||||
}
|
||||
else {
|
||||
$Cert = Get-PfxCertificate -FilePath $CSContent.PfxCertificate -ErrorAction Stop
|
||||
|
Loading…
Reference in New Issue
Block a user